diff --git a/core/src/net/sf/openrocket/rocketcomponent/Rocket.java b/core/src/net/sf/openrocket/rocketcomponent/Rocket.java index 6f0da8e79..e1c47ec65 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/Rocket.java +++ b/core/src/net/sf/openrocket/rocketcomponent/Rocket.java @@ -310,24 +310,11 @@ public class Rocket extends RocketComponent { // Rocket copy is cloned, so non-trivial members must be cloned as well: copy.stageMap = new HashMap(); copy.configSet = new FlightConfigurableParameterSet( this.configSet ); - new HashMap(); - if( 0 < this.configSet.size() ){ - Rocket.cloneConfigs( this, copy); - } copy.listenerList = new ArrayList(); return copy; } - private static void cloneConfigs( final Rocket source, Rocket dest ){ - source.checkState(); - dest.checkState(); - dest.selectedConfiguration = source.selectedConfiguration.clone(); - for( final FlightConfiguration config : source.configSet ){ - dest.configSet.set( config.getId(), config.clone() ); - } - } - public int getFlightConfigurationCount() { checkState(); return this.configSet.size(); @@ -363,7 +350,7 @@ public class Rocket extends RocketComponent { this.functionalModID = r.functionalModID; this.refType = r.refType; this.customReferenceLength = r.customReferenceLength; - Rocket.cloneConfigs( r, this); + this.configSet = new FlightConfigurableParameterSet( r.configSet ); this.perfectFinish = r.perfectFinish;