From eeabeb4f32b679c28eb7413b638a07035e0d7eb8 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 4 Jul 2017 16:51:34 +0100 Subject: [PATCH] JAL-147 revised update of startSeq, endSeq on unhide sequences --- src/jalview/viewmodel/AlignmentViewport.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index 5e88c87..d3e502b 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -1392,6 +1392,7 @@ public abstract class AlignmentViewport implements AlignViewportI, public void showAllHiddenSeqs() { int startSeq = ranges.getStartSeq(); + int endSeq = ranges.getEndSeq(); if (alignment.getHiddenSequences().getSize() > 0) { @@ -1410,7 +1411,7 @@ public abstract class AlignmentViewport implements AlignViewportI, hiddenRepSequences = null; - ranges.setStartSeq(startSeq); + ranges.setStartEndSeq(startSeq, endSeq + tmp.size()); firePropertyChange("alignment", null, alignment.getSequences()); // used to set hasHiddenRows/hiddenRepSequences here, after the property @@ -1422,6 +1423,7 @@ public abstract class AlignmentViewport implements AlignViewportI, public void showSequence(int index) { int startSeq = ranges.getStartSeq(); + int endSeq = ranges.getEndSeq(); List tmp = alignment.getHiddenSequences().showSequence( index, hiddenRepSequences); @@ -1438,7 +1440,10 @@ public abstract class AlignmentViewport implements AlignViewportI, selectionGroup.addSequence(seq, false); setSequenceAnnotationsVisible(seq, true); } - ranges.setStartSeq(startSeq); + + // ranges.setStartSeq(startSeq); + ranges.setStartEndSeq(startSeq, endSeq + tmp.size()); + firePropertyChange("alignment", null, alignment.getSequences()); sendSelection(); } -- 1.7.10.2