bug fixes
[debian/openrocket] / src / net / sf / openrocket / gui / main / SimulationEditDialog.java
index 2b3829d77763a05eacddce633fd246baac66f640..1cce5ce6b4b4295bb5dc2b9ea6b1c41437874668 100644 (file)
@@ -634,6 +634,12 @@ public class SimulationEditDialog extends JDialog {
                button.setToolTipText("Reset the time step to its default value (" +
                                UnitGroup.UNITS_SHORT_TIME.toStringUnit(RK4Simulator.RECOMMENDED_TIME_STEP) +
                                ").");
+               button.addActionListener(new ActionListener() {
+                       @Override
+                       public void actionPerformed(ActionEvent e) {
+                               conditions.setTimeStep(RK4Simulator.RECOMMENDED_TIME_STEP);
+                       }
+               });
                                
 //             button.setToolTipText("<html>Reset the step value to its default:<br>" +
 //                             "Time step " +
@@ -744,34 +750,7 @@ public class SimulationEditDialog extends JDialog {
                        return noDataPanel();
                }
                
-               
-               if (true)
-                       return new SimulationPlotPanel(simulation);
-               
-               JPanel panel = new JPanel(new MigLayout("fill"));
-               
-               
-               
-               
-               JButton button = new JButton("test");
-
-               button.addActionListener(new ActionListener() {
-                       @Override
-                       public void actionPerformed(ActionEvent e) {
-                               PlotConfiguration config = new PlotConfiguration();
-                               config.addPlotDataType(FlightDataBranch.TYPE_ALTITUDE);
-                               config.addPlotDataType(FlightDataBranch.TYPE_VELOCITY_Z);
-                               config.addPlotDataType(FlightDataBranch.TYPE_ACCELERATION_Z);
-                               config.addPlotDataType(FlightDataBranch.TYPE_ACCELERATION_TOTAL);
-                               
-                               config.setDomainAxisType(FlightDataBranch.TYPE_TIME);
-                               
-                               performPlot(config);
-                       }
-               });
-               panel.add(button);
-               
-               return panel;
+               return new SimulationPlotPanel(simulation);
        }