From fbbcbaf726e00adcae8a55d3342abffbe74b8b52 Mon Sep 17 00:00:00 2001 From: kiramt Date: Fri, 5 May 2017 10:18:29 +0100 Subject: [PATCH] JAL-2491 More working split panel + new scrolling --- src/jalview/gui/AlignViewport.java | 1 + src/jalview/gui/AlignmentPanel.java | 7 ++++++- src/jalview/gui/SeqPanel.java | 7 ------- 3 files changed, 7 insertions(+), 8 deletions(-) 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(); -- 1.7.10.2