From 4cd56c161694ae177781e8fb971b0ef71a127fc1 Mon Sep 17 00:00:00 2001 From: Daniel_M_Williams Date: Sat, 8 Aug 2020 18:26:12 -0400 Subject: [PATCH] [fixes #699] preselect first AxialStage on Rocket-Open --- swing/src/net/sf/openrocket/gui/main/BasicFrame.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swing/src/net/sf/openrocket/gui/main/BasicFrame.java b/swing/src/net/sf/openrocket/gui/main/BasicFrame.java index 04a1c43dc..475945cad 100644 --- a/swing/src/net/sf/openrocket/gui/main/BasicFrame.java +++ b/swing/src/net/sf/openrocket/gui/main/BasicFrame.java @@ -282,6 +282,9 @@ public class BasicFrame extends JFrame { tree = new ComponentTree(document); tree.setSelectionModel(componentSelectionModel); + if( tree.isSelectionEmpty() ){ + tree.setSelectionRow(1); + } // Remove JTree key events that interfere with menu accelerators InputMap im = SwingUtilities.getUIInputMap(tree, JComponent.WHEN_FOCUSED);