End of GroupEditing, GroupDefiningMode!!!!!
authoramwaterhouse <Andrew Waterhouse>
Wed, 15 Dec 2004 17:20:32 +0000 (17:20 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 15 Dec 2004 17:20:32 +0000 (17:20 +0000)
src/jalview/gui/SeqPanel.java

index ad75942..e2caa41 100755 (executable)
@@ -43,10 +43,10 @@ public class SeqPanel extends JPanel
 \r
       public void mouseDragged(MouseEvent evt)\r
       {\r
-        if(av.groupDefiningMode)\r
-          doMouseDraggedDefineMode(evt);\r
-        else\r
+        if(evt.isShiftDown() || evt.isControlDown())\r
           doMouseDragged(evt);\r
+        else\r
+          doMouseDraggedDefineMode(evt);\r
       }\r
     });\r
 \r
@@ -54,17 +54,17 @@ public class SeqPanel extends JPanel
     {\r
       public void mouseReleased(MouseEvent evt)\r
       {\r
-        if(av.groupDefiningMode)\r
-          doMouseReleasedDefineMode(evt);\r
-        else\r
+        if(evt.isShiftDown() || evt.isControlDown())\r
           doMouseReleased(evt);\r
+        else\r
+          doMouseReleasedDefineMode(evt);\r
       }\r
       public void mousePressed(MouseEvent evt)\r
       {\r
-        if(av.groupDefiningMode)\r
-          doMousePressedDefineMode(evt);\r
-        else\r
+        if(evt.isShiftDown() || evt.isControlDown())\r
           doMousePressed(evt);\r
+        else\r
+          doMousePressedDefineMode(evt);\r
       }\r
 \r
     });\r
@@ -175,6 +175,7 @@ public class SeqPanel extends JPanel
 \r
   public void doMouseDragged(MouseEvent evt) {\r
     // If we're dragging we're editing\r
+\r
     editFlag = true;\r
     int x = evt.getX();\r
 \r
@@ -185,7 +186,7 @@ public class SeqPanel extends JPanel
       if (startseq != -1) {\r
 \r
        // Group editing\r
-       if (av.getGroupEdit()) {\r
+       if (evt.isControlDown()) {\r
          SequenceGroup sg = av.getAlignment().findGroup(startseq);\r
 \r
           if(sg!=null)\r
@@ -359,7 +360,7 @@ public class SeqPanel extends JPanel
     }\r
     else if( javax.swing.SwingUtilities.isRightMouseButton(evt))\r
     {\r
-        jalview.gui.PopupMenu pop = new jalview.gui.PopupMenu( av , this);\r
+        jalview.gui.PopupMenu pop = new jalview.gui.PopupMenu( parent , null);\r
         pop.show(this, evt.getX(), evt.getY());\r
 \r
     // edit the properties of existing group\r