From 568011c82e003d19f533147e6429407ca56b67ec Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 1 May 2006 13:22:38 +0000 Subject: [PATCH] If no group, hide menu --- src/jalview/appletgui/APopupMenu.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/jalview/appletgui/APopupMenu.java b/src/jalview/appletgui/APopupMenu.java index 1d5eace..6393f74 100755 --- a/src/jalview/appletgui/APopupMenu.java +++ b/src/jalview/appletgui/APopupMenu.java @@ -80,12 +80,17 @@ public class APopupMenu } SequenceGroup sg = ap.av.getSelectionGroup(); - if (sg != null) + + if (sg != null && sg.getSize()>0) { showText.setState(sg.getDisplayText()); showColourText.setState(sg.getColourText()); showBoxes.setState(sg.getDisplayBoxes()); } + else + { + remove(groupMenu); + } if (!ap.av.alignment.getGroups().contains(sg)) { -- 1.7.10.2