From 79ee38f518d0b57f9c422acf65bbbcca40cbbfec Mon Sep 17 00:00:00 2001 From: kruland2607 Date: Fri, 5 Jul 2013 23:37:35 -0500 Subject: [PATCH] Fix logic used to open Plot vs Run dialog. Only plot when there is data which is up to date or external. --- core/src/net/sf/openrocket/gui/main/SimulationPanel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/net/sf/openrocket/gui/main/SimulationPanel.java b/core/src/net/sf/openrocket/gui/main/SimulationPanel.java index cf962e6d0..8ba194723 100644 --- a/core/src/net/sf/openrocket/gui/main/SimulationPanel.java +++ b/core/src/net/sf/openrocket/gui/main/SimulationPanel.java @@ -28,6 +28,7 @@ import net.sf.openrocket.aerodynamics.Warning; import net.sf.openrocket.aerodynamics.WarningSet; import net.sf.openrocket.document.OpenRocketDocument; import net.sf.openrocket.document.Simulation; +import net.sf.openrocket.document.Simulation.Status; import net.sf.openrocket.document.events.DocumentChangeEvent; import net.sf.openrocket.document.events.DocumentChangeListener; import net.sf.openrocket.document.events.SimulationChangeEvent; @@ -571,7 +572,7 @@ public class SimulationPanel extends JPanel { private void openDialog(final Simulation sim) { boolean plotMode = false; - if (sim.hasSimulationData()) { + if (sim.hasSimulationData() && (sim.getStatus() == Status.UPTODATE || sim.getStatus() == Status.EXTERNAL)) { plotMode = true; } openDialog(plotMode, sim);