return;\r
}\r
\r
+\r
SequenceGroup sg = viewport.getSelectionGroup();\r
+ boolean allSequences = false;\r
+ if(sg.sequences.size()==viewport.alignment.getHeight())\r
+ allSequences = true;\r
+\r
for (int i = 0; i < sg.sequences.size(); i++)\r
{\r
SequenceI seq = sg.getSequenceAt(i);\r
int index = viewport.getAlignment().findIndex(seq);\r
seq.deleteChars(sg.getStartRes(), sg.getEndRes() + 1);\r
\r
+ // If the cut affects all sequences, remove highlighted columns\r
+ if (allSequences)\r
+ {\r
+ viewport.getColumnSelection().removeElements(sg.getStartRes(),\r
+ sg.getEndRes() + 1);\r
+ }\r
+\r
+\r
if (seq.getSequence().length() < 1)\r
{\r
viewport.getAlignment().deleteSequence(seq);\r
}\r
j++;\r
}\r
- while(j < end);\r
+ while(j < end && j < jSize) ;\r
}\r
\r
viewport.updateConservation();\r
HistoryItem.HIDE));\r
\r
SequenceGroup sg = viewport.getSelectionGroup();\r
+ boolean allSequences = false;\r
+ if(sg.sequences.size()==viewport.alignment.getHeight())\r
+ allSequences = true;\r
\r
for (int i = 0; i < sg.sequences.size(); i++)\r
{\r
int index = viewport.getAlignment().findIndex(seq);\r
seq.deleteChars(sg.getStartRes(), sg.getEndRes() + 1);\r
\r
+ // If the cut affects all sequences, remove highlighted columns\r
+ if(allSequences)\r
+ {\r
+ viewport.getColumnSelection().removeElements(sg.getStartRes(), sg.getEndRes()+1);\r
+ }\r
+\r
+\r
if (seq.getSequence().length() < 1)\r
{\r
seqsdeleted = true;\r
\r
j++;\r
}\r
- while (j < end);\r
+ while (j < end && j < jSize);\r
}\r
\r
viewport.updateConservation();\r