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 {
 | 
			
		||||
			
 | 
			
		||||
			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
 | 
			
		||||
					MotorDescriptionSubstitutor formatter = Application.getInjector().getInstance(MotorDescriptionSubstitutor.class);
 | 
			
		||||
					
 | 
			
		||||
@ -419,6 +423,7 @@ public class SimulationOptions implements ChangeSource, Cloneable {
 | 
			
		||||
					}
 | 
			
		||||
					
 | 
			
		||||
					this.motorID = matchID;
 | 
			
		||||
				}
 | 
			
		||||
			} else {
 | 
			
		||||
				this.motorID = null;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user