X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=core%2Fsrc%2Fnet%2Fsf%2Fopenrocket%2Fdocument%2FSimulation.java;h=edb093c3b9b016c813ce61ba1ddf0858f42340ff;hb=4095cb0dd61a75b7b6b0bd811f8e803af5b27919;hp=74d3ab28ed517b03f9d2163f95b999f47054ffde;hpb=ace80eeeeca723d4bd6f1cf6736f16b70055be8f;p=debian%2Fopenrocket diff --git a/core/src/net/sf/openrocket/document/Simulation.java b/core/src/net/sf/openrocket/document/Simulation.java index 74d3ab28..edb093c3 100644 --- a/core/src/net/sf/openrocket/document/Simulation.java +++ b/core/src/net/sf/openrocket/document/Simulation.java @@ -75,8 +75,6 @@ public class Simulation implements ChangeSource, Cloneable { private Class simulationStepperClass = RK4SimulationStepper.class; private Class aerodynamicCalculatorClass = BarrowmanCalculator.class; private Class massCalculatorClass = BasicMassCalculator.class; - - /** Listeners for this object */ private List listeners = new ArrayList(); @@ -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); }