From: amwaterhouse Date: Tue, 22 Aug 2006 10:39:03 +0000 (+0000) Subject: Remove group when hiding cols from scalePanel X-Git-Tag: Release_2_1~7 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=af685d345a5d48c09725795e70779178043ae914;p=jalview.git Remove group when hiding cols from scalePanel --- diff --git a/src/jalview/appletgui/ScalePanel.java b/src/jalview/appletgui/ScalePanel.java index 6130f76..bfa0531 100755 --- a/src/jalview/appletgui/ScalePanel.java +++ b/src/jalview/appletgui/ScalePanel.java @@ -110,6 +110,11 @@ public class ScalePanel public void actionPerformed(ActionEvent e) { av.hideColumns(res, res); + if (av.getSelectionGroup() != null + && + av.getSelectionGroup().getSize(false) == av.alignment.getHeight()) + av.setSelectionGroup(null); + ap.repaint(); if (ap.overviewPanel != null) ap.overviewPanel.updateOverviewImage(); diff --git a/src/jalview/gui/ScalePanel.java b/src/jalview/gui/ScalePanel.java index 19211cd..7ed0146 100755 --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@ -118,6 +118,10 @@ public class ScalePanel extends JPanel implements MouseMotionListener, MouseList public void actionPerformed(ActionEvent e) { av.hideColumns(res, res); + if(av.getSelectionGroup()!=null + && av.getSelectionGroup().getSize(false)==av.alignment.getHeight()) + av.setSelectionGroup(null); + ap.repaint(); if (ap.overviewPanel != null) ap.overviewPanel.updateOverviewImage();