int y = e.getY();\r
int seq = av.getIndex(y);\r
\r
- selectedSequenceGroup = av.getRubberbandGroup();\r
+ if (javax.swing.SwingUtilities.isRightMouseButton(e))\r
+ {\r
+ jalview.gui.PopupMenu pop = new jalview.gui.PopupMenu(alignPanel,\r
+ av.getAlignment().getSequenceAt(seq));\r
+ pop.show(this, e.getX(), y);\r
+ return;\r
+ }\r
+\r
+\r
+\r
+ if(av.getRubberbandGroup()!=null && (av.getRubberbandGroup().getSize() == av.getSelection().size()))\r
+ selectedSequenceGroup = av.getRubberbandGroup();\r
+\r
if (selectedSequenceGroup == null)\r
{\r
selectedSequenceGroup = new SequenceGroup();\r
\r
lastid = seq;\r
\r
- if( javax.swing.SwingUtilities.isRightMouseButton(e))\r
- {\r
- jalview.gui.PopupMenu pop = new jalview.gui.PopupMenu(alignPanel, av.getAlignment().getSequenceAt(seq) );\r
- pop.show(this, e.getX(), y);\r
- }\r
-\r
\r
return;\r
}\r