From: kiramt Date: Thu, 25 May 2017 13:31:51 +0000 (+0100) Subject: JAl-2034 Ported to applet X-Git-Tag: Release_2_10_2~3^2~54^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=aa3f68f34c3128308d561b321168fb755539f999;p=jalview.git JAl-2034 Ported to applet --- diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index d46cc34..0e12d74 100644 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -585,13 +585,13 @@ public class SeqPanel extends Panel implements MouseMotionListener, @Override public void mouseReleased(MouseEvent evt) { + boolean didDrag = mouseDragging; // did we come here after a drag mouseDragging = false; mouseWheelPressed = false; - ap.paintAlignment(true); if (!editingSeqs) { - doMouseReleasedDefineMode(evt); + doMouseReleasedDefineMode(evt, didDrag); return; } @@ -1463,7 +1463,7 @@ public class SeqPanel extends Panel implements MouseMotionListener, { if (links == null) { - links = new Vector(); + links = new Vector<>(); } for (int j = 0; j < allFeatures[i].links.size(); j++) { @@ -1512,7 +1512,7 @@ public class SeqPanel extends Panel implements MouseMotionListener, } } - public void doMouseReleasedDefineMode(MouseEvent evt) + public void doMouseReleasedDefineMode(MouseEvent evt, boolean afterDrag) { if (stretchGroup == null) { @@ -1522,7 +1522,8 @@ public class SeqPanel extends Panel implements MouseMotionListener, // but defer colourscheme update until hidden sequences are passed in boolean vischange = stretchGroup.recalcConservation(true); // here we rely on stretchGroup == av.getSelection() - needOverviewUpdate |= vischange && av.isSelectionDefinedGroup(); + needOverviewUpdate |= vischange && av.isSelectionDefinedGroup() + && afterDrag; if (stretchGroup.cs != null) { stretchGroup.cs.alignmentChanged(stretchGroup,