From 714184fd399f3bdeeb7eaef87dfb48216196e325 Mon Sep 17 00:00:00 2001 From: Sibo Van Gool Date: Mon, 30 Aug 2021 12:20:36 +0200 Subject: [PATCH] [fixes 771] Fix sims not updating after ejection charge delay change --- .../gui/main/flightconfigpanel/MotorConfigurationPanel.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java index 20f81183f..24c235e93 100644 --- a/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java +++ b/swing/src/net/sf/openrocket/gui/main/flightconfigpanel/MotorConfigurationPanel.java @@ -203,13 +203,15 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel throw new IllegalStateException("Attempting to set a motor on the default FCID."); } + double initDelay = curMount.getMotorConfig(fcid).getEjectionDelay(); + motorChooserDialog.setMotorMountAndConfig( fcid, curMount ); motorChooserDialog.setVisible(true); Motor mtr = motorChooserDialog.getSelectedMotor(); double d = motorChooserDialog.getSelectedDelay(); if (mtr != null) { - if (mtr == curMount.getMotorConfig(fcid).getMotor()) { + if (mtr == curMount.getMotorConfig(fcid).getMotor() && d == initDelay) { return; } final MotorConfiguration templateConfig = curMount.getMotorConfig(fcid);