Fix logic used to open Plot vs Run dialog. Only plot when there is data

which is up to date or external.
This commit is contained in:
kruland2607 2013-07-05 23:37:35 -05:00
parent dbcd6b5c6a
commit 79ee38f518

View File

@ -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);