From c027ac12ece3a0dd85ddb12af703ad39e5e46d7c Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 15 Dec 2004 17:20:32 +0000 Subject: [PATCH] End of GroupEditing, GroupDefiningMode!!!!! --- src/jalview/gui/SeqPanel.java | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index ad75942..e2caa41 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -43,10 +43,10 @@ public class SeqPanel extends JPanel public void mouseDragged(MouseEvent evt) { - if(av.groupDefiningMode) - doMouseDraggedDefineMode(evt); - else + if(evt.isShiftDown() || evt.isControlDown()) doMouseDragged(evt); + else + doMouseDraggedDefineMode(evt); } }); @@ -54,17 +54,17 @@ public class SeqPanel extends JPanel { public void mouseReleased(MouseEvent evt) { - if(av.groupDefiningMode) - doMouseReleasedDefineMode(evt); - else + if(evt.isShiftDown() || evt.isControlDown()) doMouseReleased(evt); + else + doMouseReleasedDefineMode(evt); } public void mousePressed(MouseEvent evt) { - if(av.groupDefiningMode) - doMousePressedDefineMode(evt); - else + if(evt.isShiftDown() || evt.isControlDown()) doMousePressed(evt); + else + doMousePressedDefineMode(evt); } }); @@ -175,6 +175,7 @@ public class SeqPanel extends JPanel public void doMouseDragged(MouseEvent evt) { // If we're dragging we're editing + editFlag = true; int x = evt.getX(); @@ -185,7 +186,7 @@ public class SeqPanel extends JPanel if (startseq != -1) { // Group editing - if (av.getGroupEdit()) { + if (evt.isControlDown()) { SequenceGroup sg = av.getAlignment().findGroup(startseq); if(sg!=null) @@ -359,7 +360,7 @@ public class SeqPanel extends JPanel } else if( javax.swing.SwingUtilities.isRightMouseButton(evt)) { - jalview.gui.PopupMenu pop = new jalview.gui.PopupMenu( av , this); + jalview.gui.PopupMenu pop = new jalview.gui.PopupMenu( parent , null); pop.show(this, evt.getX(), evt.getY()); // edit the properties of existing group -- 1.7.10.2