From cae555513998427bbe3447a3a2926765bb2b6295 Mon Sep 17 00:00:00 2001 From: Sibo Van Gool Date: Mon, 31 Jan 2022 02:03:18 +0100 Subject: [PATCH] [fixes #1055] Fix simulation status after save only primary figures Previously, if you saved a file with 'Simulated data to store: Only primary figures', the simulation status in the .ork file was still 'uptodate',but there was no sim data --- .../net/sf/openrocket/file/openrocket/OpenRocketSaver.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/net/sf/openrocket/file/openrocket/OpenRocketSaver.java b/core/src/net/sf/openrocket/file/openrocket/OpenRocketSaver.java index e55f1d366..0340c2cde 100644 --- a/core/src/net/sf/openrocket/file/openrocket/OpenRocketSaver.java +++ b/core/src/net/sf/openrocket/file/openrocket/OpenRocketSaver.java @@ -318,8 +318,11 @@ public class OpenRocketSaver extends RocketSaver { private void saveSimulation(Simulation simulation, double timeSkip) throws IOException { SimulationOptions cond = simulation.getOptions(); - - writeln(""); + + Simulation.Status simStatus; + simStatus = timeSkip != StorageOptions.SIMULATION_DATA_NONE ? simulation.getStatus() : Simulation.Status.OUTDATED; + + writeln(""); indent++; writeln("" + TextUtil.escapeXML(simulation.getName()) + "");