From af685d345a5d48c09725795e70779178043ae914 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 22 Aug 2006 10:39:03 +0000 Subject: [PATCH] Remove group when hiding cols from scalePanel --- src/jalview/appletgui/ScalePanel.java | 5 +++++ src/jalview/gui/ScalePanel.java | 4 ++++ 2 files changed, 9 insertions(+) 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(); -- 1.7.10.2