Wired in remove deployment configuration.
This commit is contained in:
parent
3a8d2d5560
commit
1f445b2268
@ -82,7 +82,7 @@ public class RecoveryConfigurationPanel extends JPanel {
|
||||
resetDeploymentButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
//resetDeployment;
|
||||
resetDeployment();
|
||||
}
|
||||
});
|
||||
this.add(resetDeploymentButton,"sizegroup button, wrap");
|
||||
@ -94,6 +94,10 @@ public class RecoveryConfigurationPanel extends JPanel {
|
||||
d.setVisible(true);
|
||||
}
|
||||
|
||||
private void resetDeployment() {
|
||||
selectedComponent.setDeploymentConfiguration(rocket.getDefaultConfiguration().getMotorConfigurationID(), null);
|
||||
}
|
||||
|
||||
private void updateButtonState() {
|
||||
boolean buttonsEnabled = selectedComponent != null;
|
||||
selectDeploymentButton.setEnabled(buttonsEnabled);
|
||||
|
@ -124,7 +124,12 @@ public abstract class RecoveryDevice extends MassObject {
|
||||
}
|
||||
|
||||
public void setDeploymentConfiguration( String configID, DeploymentConfiguration config ) {
|
||||
deploymentConfigurations.put(configID, config);
|
||||
if ( config == null ) {
|
||||
deploymentConfigurations.remove(configID);
|
||||
} else {
|
||||
deploymentConfigurations.put(configID, config);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public DeployEvent getDefaultDeployEvent() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user