X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FSeqPanel.java;h=2d44a0f1fd8c86e70c6cb8772283c5d81c0bc046;hb=07c11f6db82ac33ec895aa82e603d4a659928a24;hp=1f1dd2f30bf072a6fcebfdc51a5a22a98fd0f9e9;hpb=2672f9a72ffb8ffaf4b48a08e64de7f3d83ce061;p=jalview.git diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 1f1dd2f..2d44a0f 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -1599,7 +1599,7 @@ public class SeqPanel extends JPanel implements MouseListener, } - if (SwingUtilities.isRightMouseButton(evt)) + if (evt.isPopupTrigger()) { List allFeatures = ap.getFeatureRenderer() .findFeaturesAtRes(sequence.getDatasetSequence(), @@ -1947,10 +1947,12 @@ public class SeqPanel extends JPanel implements MouseListener, // do we want to thread this ? (contention with seqsel and colsel locks, I // suspect) - // rules are: colsel is copied if there is a real intersection between - // sequence selection + /* + * only copy colsel if there is a real intersection between + * sequence selection and this panel's alignment + */ boolean repaint = false; - boolean copycolsel = true; + boolean copycolsel = false; SequenceGroup sgroup = null; if (seqsel != null && seqsel.getSize() > 0) @@ -1964,11 +1966,9 @@ public class SeqPanel extends JPanel implements MouseListener, } sgroup = seqsel.intersect(av.getAlignment(), (av.hasHiddenRows()) ? av.getHiddenRepSequences() : null); - if ((sgroup == null || sgroup.getSize() == 0) - || (colsel == null || colsel.isEmpty())) + if ((sgroup != null && sgroup.getSize() > 0)) { - // don't copy columns if the region didn't intersect. - copycolsel = false; + copycolsel = true; } } if (sgroup != null && sgroup.getSize() > 0) @@ -2061,7 +2061,6 @@ public class SeqPanel extends JPanel implements MouseListener, ColumnSelection cs = MappingUtils.mapColumnSelection(colsel, sourceAv, av); av.setColumnSelection(cs); - av.isColSelChanged(true); PaintRefresher.Refresh(this, av.getSequenceSetId());