[fixes #1088] Open motor selection upon new/copy config

This commit is contained in:
Sibo Van Gool 2022-01-30 01:27:06 +01:00
parent 42a0e4b389
commit ce8be05865
2 changed files with 3 additions and 1 deletions

View File

@ -82,6 +82,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
motorConfigurationPanel.table.setColumnSelectionInterval(lastCol, lastCol); motorConfigurationPanel.table.setColumnSelectionInterval(lastCol, lastCol);
configurationChanged(ComponentChangeEvent.MOTOR_CHANGE); configurationChanged(ComponentChangeEvent.MOTOR_CHANGE);
configurationChanged(ComponentChangeEvent.NONFUNCTIONAL_CHANGE); // Trigger select configurationChanged(ComponentChangeEvent.NONFUNCTIONAL_CHANGE); // Trigger select
motorConfigurationPanel.selectMotor();
} }
}); });
@ -115,6 +116,7 @@ public class FlightConfigurationPanel extends JPanel implements StateChangeListe
addOrCopyConfiguration(true); addOrCopyConfiguration(true);
configurationChanged(ComponentChangeEvent.MOTOR_CHANGE); configurationChanged(ComponentChangeEvent.MOTOR_CHANGE);
configurationChanged(ComponentChangeEvent.NONFUNCTIONAL_CHANGE); // Trigger select configurationChanged(ComponentChangeEvent.NONFUNCTIONAL_CHANGE); // Trigger select
motorConfigurationPanel.selectMotor();
} }
}); });
this.add(copyConfButton, "wrap"); this.add(copyConfButton, "wrap");

View File

@ -204,7 +204,7 @@ public class MotorConfigurationPanel extends FlightConfigurablePanel<MotorMount>
} }
} }
private void selectMotor() { public void selectMotor() {
MotorMount curMount = getSelectedComponent(); MotorMount curMount = getSelectedComponent();
FlightConfigurationId fcid= getSelectedConfigurationId(); FlightConfigurationId fcid= getSelectedConfigurationId();
if ( (null == fcid )||( null == curMount )){ if ( (null == fcid )||( null == curMount )){