From: kiramt Date: Fri, 5 May 2017 09:18:29 +0000 (+0100) Subject: JAL-2491 More working split panel + new scrolling X-Git-Tag: Release_2_10_2~3^2~64^2~24 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fbbcbaf726e00adcae8a55d3342abffbe74b8b52;p=jalview.git JAL-2491 More working split panel + new scrolling --- diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 602e3a1..5653340 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -1049,6 +1049,7 @@ public class AlignViewport extends AlignmentViewport implements .getAlignPanel(); complementPanel.setDontScrollComplement(true); complementPanel.scrollToCentre(sr, verticalOffset); + complementPanel.setDontScrollComplement(false); } } diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 0a128c8..8695583 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -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); + } } } diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index db7aa36..ce434f5 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -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();