From 9fa3368723ed450b77baeb02c5eaec33f7668965 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 5 Jun 2019 15:22:02 +0100 Subject: [PATCH] JAL-3288 override JInternalFrame.setSelected() to avoid cancelling menus --- src/jalview/gui/SplitFrame.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/SplitFrame.java b/src/jalview/gui/SplitFrame.java index 4a4c10c..44a97bc 100644 --- a/src/jalview/gui/SplitFrame.java +++ b/src/jalview/gui/SplitFrame.java @@ -29,7 +29,6 @@ import jalview.util.Platform; import jalview.viewmodel.AlignmentViewport; import java.awt.Component; -import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; @@ -789,4 +788,13 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI }; overrideKeyBinding(key_cmdF, action); } + + /** + * Override to do nothing - let the embedded AlignFrame's be the selected frame + */ + @Override + public void setSelected(boolean selected) throws PropertyVetoException + { + // no-op here fixes JAL-3288 (menus close immediately) + } } -- 1.7.10.2