Make SimulationOptions.copyFrom prefer matches based on exact match of
the configuration id.
This commit is contained in:
parent
4cc3485fa0
commit
ea3aeedf1b
@ -404,6 +404,10 @@ public class SimulationOptions implements ChangeSource, Cloneable {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (src.rocket.hasMotors(src.motorID)) {
|
if (src.rocket.hasMotors(src.motorID)) {
|
||||||
|
// First check for exact match:
|
||||||
|
if (this.rocket.isFlightConfigurationID(src.motorID)) {
|
||||||
|
this.motorID = src.motorID;
|
||||||
|
} else {
|
||||||
// Try to find a closely matching motor ID
|
// Try to find a closely matching motor ID
|
||||||
MotorDescriptionSubstitutor formatter = Application.getInjector().getInstance(MotorDescriptionSubstitutor.class);
|
MotorDescriptionSubstitutor formatter = Application.getInjector().getInstance(MotorDescriptionSubstitutor.class);
|
||||||
|
|
||||||
@ -419,6 +423,7 @@ public class SimulationOptions implements ChangeSource, Cloneable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.motorID = matchID;
|
this.motorID = matchID;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.motorID = null;
|
this.motorID = null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user