Merge branch 'bug/JAL-2034_fix' into develop
authorJim Procter <jprocter@issues.jalview.org>
Thu, 1 Sep 2016 17:44:26 +0000 (18:44 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 1 Sep 2016 17:44:26 +0000 (18:44 +0100)
1  2 
src/jalview/gui/IdPanel.java
src/jalview/gui/SeqPanel.java

Simple merge
@@@ -1554,9 -1547,10 +1555,10 @@@ public class SeqPanel extends JPanel im
     */
    public void doMousePressedDefineMode(MouseEvent evt)
    {
 -    int res = findRes(evt);
 -    int seq = findSeq(evt);
 +    final int res = findRes(evt);
 +    final int seq = findSeq(evt);
      oldSeq = seq;
+     needOverviewUpdate = false;
  
      startWrapBlock = wrappedBlock;
  
        }
  
        av.setSelectionGroup(stretchGroup);
      }
  
 -    if (evt.isPopupTrigger())
 +    if (evt.isPopupTrigger()) // Mac: mousePressed
      {
 -      List<SequenceFeature> allFeatures = ap.getFeatureRenderer()
 -              .findFeaturesAtRes(sequence.getDatasetSequence(),
 -                      sequence.findPosition(res));
 -      List<String> links = new ArrayList<String>();
 -      for (SequenceFeature sf : allFeatures)
 -      {
 -        if (sf.links != null)
 -        {
 -          for (String link : sf.links)
 -          {
 -            links.add(link);
 -          }
 -        }
 -      }
 +      showPopupMenu(evt);
 +      return;
 +    }
  
 -      PopupMenu pop = new PopupMenu(ap, null, links);
 -      pop.show(this, evt.getX(), evt.getY());
 +    /*
 +     * 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(evt) && !Platform.isAMac())
 +    {
        return;
      }