Merge pull request #1590 from SiboVG/issue-1555

[#1555] Don't open config dialog for duplicate config
This commit is contained in:
SiboVG 2022-08-23 22:16:31 +02:00 committed by GitHub
commit 1c38aa4dd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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