[fixes 771] Fix sims not updating after ejection charge delay change

This commit is contained in:
Sibo Van Gool 2021-08-30 12:20:36 +02:00
parent e9bda5c13a
commit 714184fd39

View File

@ -203,13 +203,15 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
throw new IllegalStateException("Attempting to set a motor on the default FCID."); throw new IllegalStateException("Attempting to set a motor on the default FCID.");
} }
double initDelay = curMount.getMotorConfig(fcid).getEjectionDelay();
motorChooserDialog.setMotorMountAndConfig( fcid, curMount ); motorChooserDialog.setMotorMountAndConfig( fcid, curMount );
motorChooserDialog.setVisible(true); motorChooserDialog.setVisible(true);
Motor mtr = motorChooserDialog.getSelectedMotor(); Motor mtr = motorChooserDialog.getSelectedMotor();
double d = motorChooserDialog.getSelectedDelay(); double d = motorChooserDialog.getSelectedDelay();
if (mtr != null) { if (mtr != null) {
if (mtr == curMount.getMotorConfig(fcid).getMotor()) { if (mtr == curMount.getMotorConfig(fcid).getMotor() && d == initDelay) {
return; return;
} }
final MotorConfiguration templateConfig = curMount.getMotorConfig(fcid); final MotorConfiguration templateConfig = curMount.getMotorConfig(fcid);