Remove group when hiding cols from scalePanel
authoramwaterhouse <Andrew Waterhouse>
Tue, 22 Aug 2006 10:39:03 +0000 (10:39 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 22 Aug 2006 10:39:03 +0000 (10:39 +0000)
src/jalview/appletgui/ScalePanel.java
src/jalview/gui/ScalePanel.java

index 6130f76..bfa0531 100755 (executable)
@@ -110,6 +110,11 @@ public class ScalePanel
           public void actionPerformed(ActionEvent e)\r
           {\r
             av.hideColumns(res, res);\r
+            if (av.getSelectionGroup() != null\r
+                &&\r
+                av.getSelectionGroup().getSize(false) == av.alignment.getHeight())\r
+              av.setSelectionGroup(null);\r
+\r
             ap.repaint();\r
             if (ap.overviewPanel != null)\r
               ap.overviewPanel.updateOverviewImage();\r
index 19211cd..7ed0146 100755 (executable)
@@ -118,6 +118,10 @@ public class ScalePanel extends JPanel implements MouseMotionListener, MouseList
               public void actionPerformed(ActionEvent e)\r
               {\r
                 av.hideColumns(res, res);\r
+                if(av.getSelectionGroup()!=null\r
+                   && av.getSelectionGroup().getSize(false)==av.alignment.getHeight())\r
+                  av.setSelectionGroup(null);\r
+\r
                 ap.repaint();\r
                 if (ap.overviewPanel != null)\r
                   ap.overviewPanel.updateOverviewImage();\r