diff --git a/core/src/net/sf/openrocket/document/Simulation.java b/core/src/net/sf/openrocket/document/Simulation.java index eed9ca6a8..8d4644450 100644 --- a/core/src/net/sf/openrocket/document/Simulation.java +++ b/core/src/net/sf/openrocket/document/Simulation.java @@ -339,7 +339,13 @@ public class Simulation implements ChangeSource, Cloneable { public static boolean isStatusUpToDate(Status status) { return status == Status.UPTODATE || status == Status.LOADED || status == Status.EXTERNAL; } - + + /** + * Syncs the modID with its flight configuration. + */ + public void syncModID() { + this.simulatedConfigurationID = getActiveConfiguration().getModID(); + } /** diff --git a/core/src/net/sf/openrocket/file/openrocket/importt/OpenRocketLoader.java b/core/src/net/sf/openrocket/file/openrocket/importt/OpenRocketLoader.java index 5460d3c99..e0bf4717b 100644 --- a/core/src/net/sf/openrocket/file/openrocket/importt/OpenRocketLoader.java +++ b/core/src/net/sf/openrocket/file/openrocket/importt/OpenRocketLoader.java @@ -4,6 +4,7 @@ import java.io.IOException; import java.io.InputStream; import java.util.List; +import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.FlightConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -62,6 +63,7 @@ public class OpenRocketLoader extends AbstractRocketLoader { // Deduce suitable time skip double timeSkip = StorageOptions.SIMULATION_DATA_NONE; for (Simulation s : doc.getSimulations()) { + s.syncModID(); // The config's modID can be out of sync with the simulation's after the whole loading process if (s.getStatus() == Simulation.Status.EXTERNAL || s.getStatus() == Simulation.Status.NOT_SIMULATED) continue;