diff --git a/core/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RecoveryConfigurationPanel.java b/core/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RecoveryConfigurationPanel.java index 624b70831..ef3eb16f4 100644 --- a/core/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RecoveryConfigurationPanel.java +++ b/core/src/net/sf/openrocket/gui/dialogs/flightconfiguration/RecoveryConfigurationPanel.java @@ -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); diff --git a/core/src/net/sf/openrocket/rocketcomponent/RecoveryDevice.java b/core/src/net/sf/openrocket/rocketcomponent/RecoveryDevice.java index da472a47f..1a543a696 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/RecoveryDevice.java +++ b/core/src/net/sf/openrocket/rocketcomponent/RecoveryDevice.java @@ -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() {