diff --git a/core/resources/l10n/messages.properties b/core/resources/l10n/messages.properties index 5d3843df0..8276e9131 100644 --- a/core/resources/l10n/messages.properties +++ b/core/resources/l10n/messages.properties @@ -387,6 +387,7 @@ simedtdlg.IntensityDesc.Veryhigh = Very high simedtdlg.IntensityDesc.Extreme = Extreme SimulationEditDialog.btn.plot = Plot +SimulationEditDialog.btn.export = Export SimulationEditDialog.btn.edit = Edit SimulationEditDialog.btn.simulateAndPlot = Simulate & Plot @@ -452,7 +453,6 @@ SimulationModifierTree.OptimizationParameters = Optimization Parameters ! SimulationExportPanel SimExpPan.desc = Comma Separated Files (*.csv) SimExpPan.border.Vartoexport = Variables to export -SimExpPan.border.Stage = Stage to export SimExpPan.but.Selectall = Select all SimExpPan.but.Selectnone = Select none SimExpPan.border.Fieldsep = Field separator diff --git a/core/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java b/core/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java index 620a5c30f..a4a461db4 100644 --- a/core/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java +++ b/core/src/net/sf/openrocket/gui/simulation/SimulationEditDialog.java @@ -14,6 +14,8 @@ import javax.swing.JPanel; import javax.swing.JTabbedPane; import javax.swing.JTextField; import javax.swing.SwingUtilities; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; @@ -264,7 +266,25 @@ public class SimulationEditDialog extends JDialog { plotExportPanel.add(button, "spanx, split 3, align left"); - JButton ok = new JButton(trans.get("SimulationEditDialog.btn.plot")); + final JButton ok = new JButton(trans.get("SimulationEditDialog.btn.plot")); + + tabbedPane.addChangeListener(new ChangeListener() { + + @Override + public void stateChanged(ChangeEvent e) { + int selectedIndex = tabbedPane.getSelectedIndex(); + switch (selectedIndex) { + case 0: + ok.setText(trans.get("SimulationEditDialog.btn.plot")); + break; + case 1: + ok.setText(trans.get("SimulationEditDialog.btn.export")); + break; + } + } + + }); + ok.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) {