[#1555] Don't open config dialog for duplicate config

This commit is contained in:
SiboVG 2022-08-15 01:32:48 +02:00
parent 31139bbab2
commit a05cf04abd

View File

@ -141,16 +141,18 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
addOrDuplicateConfiguration(duplicate); addOrDuplicateConfiguration(duplicate);
configurationChanged(ComponentChangeEvent.MOTOR_CHANGE); configurationChanged(ComponentChangeEvent.MOTOR_CHANGE);
stateChanged(null); stateChanged(null);
switch (tabs.getSelectedIndex()) { if (!duplicate) {
case MOTOR_TAB_INDEX: switch (tabs.getSelectedIndex()) {
motorConfigurationPanel.selectMotor(); case MOTOR_TAB_INDEX:
break; motorConfigurationPanel.selectMotor();
case RECOVERY_TAB_INDEX: break;
recoveryConfigurationPanel.selectDeployment(); case RECOVERY_TAB_INDEX:
break; recoveryConfigurationPanel.selectDeployment();
case SEPARATION_TAB_INDEX: break;
separationConfigurationPanel.selectSeparation(); case SEPARATION_TAB_INDEX:
break; separationConfigurationPanel.selectSeparation();
break;
}
} }
configurationChanged(ComponentChangeEvent.NONFUNCTIONAL_CHANGE); // Trigger select configurationChanged(ComponentChangeEvent.NONFUNCTIONAL_CHANGE); // Trigger select
} }