JAL-3288 override JInternalFrame.setSelected() to avoid cancelling menus bug/JAL-3288splitFrameMenusJava11
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 5 Jun 2019 14:22:02 +0000 (15:22 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 5 Jun 2019 14:22:02 +0000 (15:22 +0100)
src/jalview/gui/SplitFrame.java

index 4a4c10c..44a97bc 100644 (file)
@@ -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)
+  }
 }