Also copy the wind model type

This commit is contained in:
SiboVG 2024-09-22 07:18:38 +01:00
parent f7455bd385
commit 78e68ecf20

View File

@ -343,6 +343,8 @@ public class SimulationOptions implements ChangeSource, Cloneable, SimulationOpt
copy.averageWindModel = this.averageWindModel.clone();
copy.multiLevelPinkNoiseWindModel = this.multiLevelPinkNoiseWindModel.clone();
copy.windModelType = this.windModelType;
// Create a new list for listeners
copy.listeners = new ArrayList<>();
@ -358,6 +360,10 @@ public class SimulationOptions implements ChangeSource, Cloneable, SimulationOpt
// changed.
boolean isChanged = false;
if (this.windModelType != src.windModelType) {
isChanged = true;
this.windModelType = src.windModelType;
}
if (!this.averageWindModel.equals(src.averageWindModel)) {
isChanged = true;
this.averageWindModel.loadFrom(src.averageWindModel);