}
/**
- * DOCUMENT ME!
+ * Calls AlignmentI.moveSelectedSequencesByOne with current sequence selection or the sequence under cursor in keyboard mode
*
* @param up
- * DOCUMENT ME!
+ * or down (if !up)
*/
public void moveSelectedSequences(boolean up)
{
if (sg == null)
{
- return;
+ if (viewport.cursorMode)
+ {
+ sg = new SequenceGroup();
+ sg.addSequence(viewport.getAlignment()
+ .getSequenceAt(alignPanel.getSeqPanel().seqCanvas.cursorY),false);
+ } else {
+ return;
+ }
+ }
+
+ if (sg.getSize() < 1)
+ {
+ return;
}
+
+ // TODO: JAL-3733 - add an event to the undo buffer for this !
+
viewport.getAlignment().moveSelectedSequencesByOne(sg,
viewport.getHiddenRepSequences(), up);
alignPanel.paintAlignment(true, false);