Merge commit '42b2e5ca519766e37ce6941ba4faecc9691cc403' into upstream
[debian/openrocket] / core / src / net / sf / openrocket / document / Simulation.java
index 74d3ab28ed517b03f9d2163f95b999f47054ffde..edb093c3b9b016c813ce61ba1ddf0858f42340ff 100644 (file)
@@ -75,8 +75,6 @@ public class Simulation implements ChangeSource, Cloneable {
        private Class<? extends SimulationStepper> simulationStepperClass = RK4SimulationStepper.class;
        private Class<? extends AerodynamicCalculator> aerodynamicCalculatorClass = BarrowmanCalculator.class;
        private Class<? extends MassCalculator> massCalculatorClass = BasicMassCalculator.class;
-       
-
 
        /** Listeners for this object */
        private List<EventListener> listeners = new ArrayList<EventListener>();
@@ -90,8 +88,8 @@ public class Simulation implements ChangeSource, Cloneable {
        
        
        /**
-        * Create a new simulation for the rocket.  The initial motor configuration is
-        * taken from the default rocket configuration.
+        * Create a new simulation for the rocket. Parent document should also be provided.
+        * The initial motor configuration is taken from the default rocket configuration.
         * 
         * @param rocket        the rocket associated with the simulation.
         */
@@ -148,7 +146,6 @@ public class Simulation implements ChangeSource, Cloneable {
                
        }
        
-       
        /**
         * Return the rocket associated with this simulation.
         * 
@@ -280,6 +277,7 @@ public class Simulation implements ChangeSource, Cloneable {
                        }
                        
                        SimulationConditions simulationConditions = options.toSimulationConditions();
+                       simulationConditions.setSimulation(this);
                        for (SimulationListener l : additionalListeners) {
                                simulationConditions.getSimulationListenerList().add(l);
                        }