From 93bfce7f70ef237692075ae8129f1fb626f16408 Mon Sep 17 00:00:00 2001 From: Doug Pedrick Date: Wed, 26 Sep 2012 18:09:12 +0000 Subject: [PATCH] Uncommented component preset editor menu item, but protected it with a system property: -Dopenrocket.preseteditor.menu if present, the editor will be on the menu. --- .../sf/openrocket/gui/main/BasicFrame.java | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/core/src/net/sf/openrocket/gui/main/BasicFrame.java b/core/src/net/sf/openrocket/gui/main/BasicFrame.java index f0f265380..2b59e9cc6 100644 --- a/core/src/net/sf/openrocket/gui/main/BasicFrame.java +++ b/core/src/net/sf/openrocket/gui/main/BasicFrame.java @@ -525,7 +525,7 @@ public class BasicFrame extends JFrame { menu.add(item); menu.addSeparator(); - + //// Quit item = new JMenuItem(trans.get("main.menu.file.quit"), KeyEvent.VK_Q); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK)); @@ -618,21 +618,22 @@ public class BasicFrame extends JFrame { menu.add(item); //// Edit Component Preset File - /* - item = new JMenuItem(trans.get("main.menu.edit.editpreset")); - item.addActionListener( new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - JFrame dialog = new JFrame(); - dialog.getContentPane().add(new ComponentPresetEditor(dialog)); - dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); - dialog.pack(); - dialog.setVisible(true); - } - }); - menu.add(item); - */ - + + if (System.getProperty("openrocket.preseteditor.menu") != null) { + item = new JMenuItem(trans.get("main.menu.edit.editpreset")); + item.addActionListener( new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + JFrame dialog = new JFrame(); + dialog.getContentPane().add(new ComponentPresetEditor(dialog)); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.pack(); + dialog.setVisible(true); + } + }); + menu.add(item); + } + //// Analyze menu = new JMenu(trans.get("main.menu.analyze")); menu.setMnemonic(KeyEvent.VK_A);