Hold onto selected region when hiding all columns only
authoramwaterhouse <Andrew Waterhouse>
Thu, 17 Aug 2006 13:40:57 +0000 (13:40 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 17 Aug 2006 13:40:57 +0000 (13:40 +0000)
src/jalview/appletgui/AlignFrame.java
src/jalview/gui/AlignViewport.java
src/jalview/gui/AlignmentPanel.java

index 92f968c..0a771e1 100755 (executable)
@@ -350,7 +350,11 @@ public class AlignFrame extends Frame implements ActionListener,
         if(toggleCols)\r
         {\r
           if (viewport.colSel.getSelected().size() > 0)\r
+          {\r
             viewport.hideSelectedColumns();\r
+            if(!toggleSeqs)\r
+                   viewport.selectionGroup = sg;\r
+          }\r
           else if (!hide)\r
             viewport.showAllHiddenColumns();\r
         }\r
index c7bc6d6..bccb877 100755 (executable)
@@ -1106,6 +1106,7 @@ public class AlignViewport
         return;\r
 \r
       colSel.hideSelectedColumns();\r
+      setSelectionGroup(null);\r
 \r
       hasHiddenColumns = true;\r
     }\r
@@ -1117,7 +1118,7 @@ public class AlignViewport
         colSel.hideColumns(start);\r
       else\r
         colSel.hideColumns(start, end);\r
-      setSelectionGroup(null);\r
+\r
       hasHiddenColumns = true;\r
     }\r
 \r
index 28feb0c..3b149f4 100755 (executable)
@@ -257,7 +257,11 @@ public class AlignmentPanel extends GAlignmentPanel
              if (toggleCols)\r
              {\r
                if(av.colSel.getSelected().size() > 0)\r
+               {\r
                  alignFrame.hideSelColumns_actionPerformed(null);\r
+                 if(!toggleSeqs)\r
+                   av.selectionGroup = sg;\r
+               }\r
                else if(!hide)\r
                  alignFrame.showAllColumns_actionPerformed(null);\r
              }\r