From: kiramt Date: Mon, 4 Sep 2017 07:14:38 +0000 (+0100) Subject: JAL-2611 reinstated missed commit X-Git-Tag: Release_2_10_2b1~11^2~8^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b47e77607ffc252a8b85120126070ed00af53757;p=jalview.git JAL-2611 reinstated missed commit --- diff --git a/src/jalview/appletgui/OverviewPanel.java b/src/jalview/appletgui/OverviewPanel.java index be552c0..e74e1cd 100755 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@ -148,11 +148,12 @@ public class OverviewPanel extends Panel implements Runnable, } else { + // don't do anything if the mouse press is in the overview's box + // (wait to see if it's a drag instead) + // otherwise update the viewport if (!od.isPositionInBox(evt.getX(), evt.getY())) - { - // don't do anything if the mouse press is in the overview's box - // (wait to see if it's a drag instead) - // otherwise update the viewport + { + draggingBox = false; od.updateViewportFromMouse(evt.getX(), evt.getY(), av.getAlignment().getHiddenSequences(), av.getAlignment().getHiddenColumns()); @@ -170,10 +171,6 @@ public class OverviewPanel extends Panel implements Runnable, @Override public void mouseReleased(MouseEvent evt) { - if (draggingBox) - { - draggingBox = false; - } } @Override diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index 28de801..06c9a61 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -158,13 +158,13 @@ public class OverviewPanel extends JPanel } } else - // if (!av.getWrapAlignment()) { + // don't do anything if the mouse press is in the overview's box + // (wait to see if it's a drag instead) + // otherwise update the viewport if (!od.isPositionInBox(evt.getX(), evt.getY())) { - // don't do anything if the mouse press is in the overview's box - // (wait to see if it's a drag instead) - // otherwise update the viewport + draggingBox = false; od.updateViewportFromMouse(evt.getX(), evt.getY(), av.getAlignment().getHiddenSequences(), av.getAlignment().getHiddenColumns()); @@ -180,15 +180,6 @@ public class OverviewPanel extends JPanel } @Override - public void mouseReleased(MouseEvent evt) - { - if (draggingBox) - { - draggingBox = false; - } - } - - @Override public void mouseClicked(MouseEvent evt) { if (SwingUtilities.isRightMouseButton(evt))