From 7592eb537b8a6ed0c69d263955f12a592bf8de8f Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 30 Nov 2018 10:26:22 +0000 Subject: [PATCH] JAL-2420 don't offer Reveal All over alignment panel --- src/jalview/gui/PopupMenu.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index ed3d29a..bc7fb3b 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -401,9 +401,20 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener } } } - // for the case when no sequences are even visible + + /* + * offer 'Reveal All' + * - in the IdPanel (seq not null) if any sequence is hidden + * - in the IdPanel or SeqPanel if all sequences are hidden (seq is null) + */ if (alignPanel.av.hasHiddenRows()) { + boolean addOption = seq != null; + if (!addOption && alignPanel.av.getAlignment().getHeight() == 0) + { + addOption = true; + } + if (addOption) { menuItem = new JMenuItem( MessageManager.getString("action.reveal_all")); @@ -419,7 +430,6 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener } } }); - add(menuItem); } } -- 1.7.10.2