JAL-2044 ensure AAStructureBindingModel.pdbEntry has no file duplicated;
[jalview.git] / src / jalview / gui / IdPanel.java
index 2aa7bf5..a65be7b 100755 (executable)
@@ -320,12 +320,13 @@ public class IdPanel extends JPanel implements MouseListener,
     if (e.isPopupTrigger()) // Mac reports this in mousePressed
     {
       showPopupMenu(e);
-
       return;
     }
+
     /*
-     * defer right-mouse click handling to mouse up on Mac
+     * defer right-mouse click handling to mouseReleased on Windows
      * (where isPopupTrigger() will answer true)
+     * NB isRightMouseButton is also true for Cmd-click on Mac
      */
     if (SwingUtilities.isRightMouseButton(e) && !Platform.isAMac())
     {
@@ -333,8 +334,8 @@ public class IdPanel extends JPanel implements MouseListener,
     }
 
     if ((av.getSelectionGroup() == null)
-            || (!jalview.util.Platform.isControlDown(e)
-                    && !e.isShiftDown() && av.getSelectionGroup() != null))
+            || (!jalview.util.Platform.isControlDown(e) && !e.isShiftDown() && av
+                    .getSelectionGroup() != null))
     {
       av.setSelectionGroup(new SequenceGroup());
       av.getSelectionGroup().setStartRes(0);
@@ -350,7 +351,7 @@ public class IdPanel extends JPanel implements MouseListener,
     {
       selectSeq(seq);
     }
-    // TODO is this addition ok here?
+
     av.isSelectionGroupChanged(true);
 
     alignPanel.paintAlignment(true);
@@ -367,8 +368,7 @@ public class IdPanel extends JPanel implements MouseListener,
     Sequence sq = (Sequence) av.getAlignment().getSequenceAt(seq2);
     // build a new links menu based on the current links + any non-positional
     // features
-    Vector<String> nlinks = new Vector<String>(
-            Preferences.sequenceURLLinks);
+    Vector<String> nlinks = new Vector<String>(Preferences.sequenceURLLinks);
     SequenceFeature sfs[] = sq == null ? null : sq.getSequenceFeatures();
     if (sfs != null)
     {