From: Jim Procter Date: Thu, 1 Sep 2016 17:44:26 +0000 (+0100) Subject: Merge branch 'bug/JAL-2034_fix' into develop X-Git-Tag: Release_2_10_0~49 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9442066e24093143605ae849f88e0a11e350da2b;p=jalview.git Merge branch 'bug/JAL-2034_fix' into develop --- 9442066e24093143605ae849f88e0a11e350da2b diff --cc src/jalview/gui/SeqPanel.java index bd8959d,d588a32..136d222 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@@ -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; @@@ -1622,22 -1613,27 +1621,21 @@@ } av.setSelectionGroup(stretchGroup); - } - if (evt.isPopupTrigger()) + if (evt.isPopupTrigger()) // Mac: mousePressed { - List allFeatures = ap.getFeatureRenderer() - .findFeaturesAtRes(sequence.getDatasetSequence(), - sequence.findPosition(res)); - List links = new ArrayList(); - 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; }