From: gmungoc Date: Fri, 30 Nov 2018 10:26:22 +0000 (+0000) Subject: JAL-2420 don't offer Reveal All over alignment panel X-Git-Tag: Release_2_11_0~17^2~93^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fbug%2FJAL-2420revealAllMenu;p=jalview.git JAL-2420 don't offer Reveal All over alignment panel --- 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); } }