From: gmungoc Date: Tue, 4 Jul 2017 15:51:34 +0000 (+0100) Subject: JAL-147 revised update of startSeq, endSeq on unhide sequences X-Git-Tag: Release_2_10_3b1~132^2~49 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=eeabeb4f32b679c28eb7413b638a07035e0d7eb8;p=jalview.git JAL-147 revised update of startSeq, endSeq on unhide sequences --- 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(); }