JAL-3345 small tidying
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 15 Jul 2019 10:49:13 +0000 (11:49 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 15 Jul 2019 10:49:13 +0000 (11:49 +0100)
src/jalview/gui/ScalePanel.java
src/jalview/gui/SeqPanel.java

index bfa903a..f525100 100755 (executable)
@@ -587,7 +587,6 @@ public class ScalePanel extends JPanel
 
   public boolean isMouseDragging()
   {
-    // TODO Auto-generated method stub
     return mouseDragging;
   }
 
index 26ec081..2e0c1f4 100644 (file)
@@ -1940,18 +1940,23 @@ public class SeqPanel extends JPanel
   @Override
   public void mouseExited(MouseEvent e)
   {
-    if (ap.getScalePanel().isMouseDragging())
-    {
-      ap.getScalePanel().mouseExited(e);
-      return;
-    }
     lastMousePosition = null;
     ap.alignFrame.setStatus(" ");
+
     if (av.getWrapAlignment())
     {
       return;
     }
-    if (mouseDragging && scrollThread == null)
+
+    /*
+     * start scrolling if mouse dragging, whether the drag started
+     * in the scale panel or this panel
+     */
+    if (ap.getScalePanel().isMouseDragging())
+    {
+      ap.getScalePanel().mouseExited(e);
+    }
+    else if (mouseDragging && scrollThread == null)
     {
       startScrolling(e.getPoint());
     }