Adapt new/copy config windows popup based on current tab
This will make sure that e.g. when you are in the recovery tab and add a new configuration, that the deployment window opens instead of the motor selection window
This commit is contained in:
parent
d0a1025f6d
commit
b26ae9e541
@ -82,7 +82,17 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
|
||||
motorConfigurationPanel.table.setColumnSelectionInterval(lastCol, lastCol);
|
||||
configurationChanged(ComponentChangeEvent.MOTOR_CHANGE);
|
||||
configurationChanged(ComponentChangeEvent.NONFUNCTIONAL_CHANGE); // Trigger select
|
||||
motorConfigurationPanel.selectMotor();
|
||||
switch (tabs.getSelectedIndex()) {
|
||||
case MOTOR_TAB_INDEX:
|
||||
motorConfigurationPanel.selectMotor();
|
||||
break;
|
||||
case RECOVERY_TAB_INDEX:
|
||||
recoveryConfigurationPanel.selectDeployment();
|
||||
break;
|
||||
case SEPARATION_TAB_INDEX:
|
||||
separationConfigurationPanel.selectSeparation();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
@ -116,7 +126,17 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
|
||||
addOrCopyConfiguration(true);
|
||||
configurationChanged(ComponentChangeEvent.MOTOR_CHANGE);
|
||||
configurationChanged(ComponentChangeEvent.NONFUNCTIONAL_CHANGE); // Trigger select
|
||||
motorConfigurationPanel.selectMotor();
|
||||
switch (tabs.getSelectedIndex()) {
|
||||
case MOTOR_TAB_INDEX:
|
||||
motorConfigurationPanel.selectMotor();
|
||||
break;
|
||||
case RECOVERY_TAB_INDEX:
|
||||
recoveryConfigurationPanel.selectDeployment();
|
||||
break;
|
||||
case SEPARATION_TAB_INDEX:
|
||||
separationConfigurationPanel.selectSeparation();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
this.add(copyConfButton, "wrap");
|
||||
|
@ -97,7 +97,7 @@ public class RecoveryConfigurationPanel extends FlightConfigurablePanel<Recovery
|
||||
return recoveryTable;
|
||||
}
|
||||
|
||||
private void selectDeployment() {
|
||||
public void selectDeployment() {
|
||||
RecoveryDevice c = getSelectedComponent();
|
||||
FlightConfigurationId fcid = getSelectedConfigurationId();
|
||||
if ((c == null) || (fcid == null)) {
|
||||
|
@ -104,7 +104,7 @@ public class SeparationConfigurationPanel extends FlightConfigurablePanel<AxialS
|
||||
return separationTable;
|
||||
}
|
||||
|
||||
private void selectSeparation() {
|
||||
public void selectSeparation() {
|
||||
AxialStage stage = getSelectedComponent();
|
||||
FlightConfigurationId fcid = getSelectedConfigurationId();
|
||||
if ((stage == null) || (fcid == null)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user