JAL-2491 More working split panel + new scrolling
authorkiramt <k.mourao@dundee.ac.uk>
Fri, 5 May 2017 09:18:29 +0000 (10:18 +0100)
committerkiramt <k.mourao@dundee.ac.uk>
Fri, 5 May 2017 09:18:29 +0000 (10:18 +0100)
src/jalview/gui/AlignViewport.java
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/SeqPanel.java

index 602e3a1..5653340 100644 (file)
@@ -1049,6 +1049,7 @@ public class AlignViewport extends AlignmentViewport implements
               .getAlignPanel();
       complementPanel.setDontScrollComplement(true);
       complementPanel.scrollToCentre(sr, verticalOffset);
+      complementPanel.setDontScrollComplement(false);
     }
   }
 
index 0a128c8..8695583 100644 (file)
@@ -1911,6 +1911,11 @@ public class AlignmentPanel extends GAlignmentPanel implements
 
     // now update any complementary alignment (its viewport ranges object
     // is different so does not get automatically updated)
-    av.scrollComplementaryAlignment();
+    if (!isDontScrollComplement())
+    {
+      setDontScrollComplement(true);
+      av.scrollComplementaryAlignment();
+      setDontScrollComplement(false);
+    }
   }
 }
index db7aa36..ce434f5 100644 (file)
@@ -689,13 +689,6 @@ public class SeqPanel extends JPanel implements MouseListener,
 
     if (av.isFollowHighlight())
     {
-      /*
-       * if scrollToPosition requires a scroll adjustment, this flag prevents
-       * another scroll event being propagated back to the originator
-       * 
-       * @see AlignmentPanel#adjustmentValueChanged
-       */
-      ap.setDontScrollComplement(true);
       if (ap.scrollToPosition(results, false))
       {
         seqCanvas.revalidate();