From 2718d85fac1aef21e2d927d81a1a1b92492975ae Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 17 Aug 2006 13:40:57 +0000 Subject: [PATCH] Hold onto selected region when hiding all columns only --- src/jalview/appletgui/AlignFrame.java | 4 ++++ src/jalview/gui/AlignViewport.java | 3 ++- src/jalview/gui/AlignmentPanel.java | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 92f968c..0a771e1 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -350,7 +350,11 @@ public class AlignFrame extends Frame implements ActionListener, if(toggleCols) { if (viewport.colSel.getSelected().size() > 0) + { viewport.hideSelectedColumns(); + if(!toggleSeqs) + viewport.selectionGroup = sg; + } else if (!hide) viewport.showAllHiddenColumns(); } diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index c7bc6d6..bccb877 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -1106,6 +1106,7 @@ public class AlignViewport return; colSel.hideSelectedColumns(); + setSelectionGroup(null); hasHiddenColumns = true; } @@ -1117,7 +1118,7 @@ public class AlignViewport colSel.hideColumns(start); else colSel.hideColumns(start, end); - setSelectionGroup(null); + hasHiddenColumns = true; } diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 28feb0c..3b149f4 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -257,7 +257,11 @@ public class AlignmentPanel extends GAlignmentPanel if (toggleCols) { if(av.colSel.getSelected().size() > 0) + { alignFrame.hideSelColumns_actionPerformed(null); + if(!toggleSeqs) + av.selectionGroup = sg; + } else if(!hide) alignFrame.showAllColumns_actionPerformed(null); } -- 1.7.10.2