}\r
// Final match if necessary.\r
if (last<end)\r
- selection.addOperation(CigarArray.M, end-last);\r
+ selection.addOperation(CigarArray.M, end-last+1);\r
} else {\r
- selection.addOperation(CigarArray.M, end-start);\r
+ selection.addOperation(CigarArray.M, end-start+1);\r
}\r
return selection;\r
}\r
{
TreePanel tp;
- if ( (viewport.getSelectionGroup() != null) &&
- (viewport.getSelectionGroup().getSize(false) > 3))
- {
+ if (viewport.getSelectionGroup() != null) {
+ if (viewport.getSelectionGroup().getSize(false) < 3) {
+ JOptionPane.showMessageDialog(Desktop.desktop,
+ "You need to have more than two sequences selected to build a tree!",
+ "Not enough sequences",
+ JOptionPane.WARNING_MESSAGE);
+ return;
+ }
+
int s = 0;
SequenceGroup sg = viewport.getSelectionGroup();
}
// Final match if necessary.
if (last<end)
- selection.addOperation(CigarArray.M, end-last);
+ selection.addOperation(CigarArray.M, end-last+1);
} else {
- selection.addOperation(CigarArray.M, end-start);
+ selection.addOperation(CigarArray.M, end-start+1);
}
return selection;
}