From 1b2a573d7c93db57c3299d768f021c9096dffc67 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 19 Jun 2015 16:13:48 +0100 Subject: [PATCH] JAL-653 JAL-1780 dropped av.setHasHiddenRows() and made av.hasHiddenRows() dynamic rather than a maintained flag --- src/jalview/appletgui/AlignFrame.java | 1 - src/jalview/gui/AlignFrame.java | 1 - src/jalview/viewmodel/AlignmentViewport.java | 16 +--------------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index aa90859..3051230 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -210,7 +210,6 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, if (hiddenSeqs != null && hiddenSeqs.length > 0) { viewport.hideSequence(hiddenSeqs); - viewport.setHasHiddenRows(true); } if (columnSelection != null) { diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 14198b9..e3efa59 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -306,7 +306,6 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, if (hiddenSeqs != null && hiddenSeqs.length > 0) { viewport.hideSequence(hiddenSeqs); - viewport.setHasHiddenRows(true); } alignPanel = new AlignmentPanel(this, viewport); addAlignmentPanel(alignPanel, true); diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index 2d9eb16..5617bcf 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -1055,18 +1055,12 @@ public abstract class AlignmentViewport implements AlignViewportI, // hasHiddenColumns = colSel.hasHiddenColumns(); } - protected boolean hasHiddenRows = false; - @Override public boolean hasHiddenRows() { - return hasHiddenRows; + return alignment.getHiddenSequences().getSize() > 0; } - public void setHasHiddenRows(boolean hasHiddenRows) - { - this.hasHiddenRows = hasHiddenRows; - } protected SequenceGroup selectionGroup; @@ -1304,7 +1298,6 @@ public abstract class AlignmentViewport implements AlignViewportI, setSequenceAnnotationsVisible(seq, true); } - hasHiddenRows = false; hiddenRepSequences = null; firePropertyChange("alignment", null, alignment.getSequences()); @@ -1332,12 +1325,6 @@ public abstract class AlignmentViewport implements AlignViewportI, selectionGroup.addSequence(seq, false); setSequenceAnnotationsVisible(seq, true); } - // JBPNote: refactor: only update flag if we modified visiblity (used to - // do this regardless) - if (alignment.getHiddenSequences().getSize() < 1) - { - hasHiddenRows = false; - } firePropertyChange("alignment", null, alignment.getSequences()); sendSelection(); } @@ -1366,7 +1353,6 @@ public abstract class AlignmentViewport implements AlignViewportI, alignment.getHiddenSequences().hideSequence(seq[i]); setSequenceAnnotationsVisible(seq[i], false); } - hasHiddenRows = true; firePropertyChange("alignment", null, alignment.getSequences()); } } -- 1.7.10.2