X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FSeqPanel.java;h=26ec0816dcb358bbf56791d671824205233c2e37;hb=23dc9ea34d4c4b6da586e23291f1a489b323b19b;hp=9a67c27b7c4dbf8cd28cce4801f373a581e99192;hpb=0b79ea556e792594cab9bd2b4f6cba3b01abaf24;p=jalview.git diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 9a67c27..26ec081 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -134,7 +134,6 @@ public class SeqPanel extends JPanel MousePos o = (MousePos) obj; boolean b = (column == o.column && seqIndex == o.seqIndex && annotationIndex == o.annotationIndex); - // System.out.println(obj + (b ? "= " : "!= ") + this); return b; } @@ -1504,7 +1503,6 @@ public class SeqPanel extends JPanel return; } - // System.out.print(y1+" "+y2+" "+fixedLeft+" "+fixedRight+"~~"); // Selection spans a hidden region if (fixedLeft < y1 && (fixedRight > y2 || fixedRight == -1)) { @@ -1942,13 +1940,17 @@ 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) { startScrolling(e.getPoint()); @@ -2408,14 +2410,7 @@ public class SeqPanel extends JPanel { scrollThread = new ScrollThread(); scrollThread.setMousePosition(mousePos); - if (!Platform.isJS()) - { - /* - * Java - run in a new thread - */ - scrollThread.start(); - } - else + if (Platform.isJS()) { /* * Javascript - run every 20ms until scrolling stopped @@ -2431,22 +2426,22 @@ public class SeqPanel extends JPanel // if (!scrollOnce() {t.stop();}) gives compiler error :-( scrollThread.scrollOnce(); } - } - }); - t.addActionListener(new ActionListener() - { - @Override - public void actionPerformed(ActionEvent e) - { if (scrollThread == null) { // SeqPanel.stopScrolling called - t.stop(); + ((Timer) e.getSource()).stop(); } } }); t.start(); } + else + { + /* + * Java - run in a new thread + */ + scrollThread.start(); + } } }