mirror of https://gitlab.com/pamhyr/pamhyr2
Scenario: Fix scenario duplicattion.
parent
090326b75c
commit
ea7fda6b28
|
|
@ -509,11 +509,19 @@ class Study(SQLModel):
|
|||
self.status.scenario.parent
|
||||
)
|
||||
|
||||
new.set_pos(self.status.scenario.x + 100,
|
||||
self.status.scenario.y + 100)
|
||||
|
||||
new.name = self.status.scenario.name + " (copy)"
|
||||
|
||||
self.river._data_traversal(
|
||||
predicate=lambda obj: obj._owner_scenario == source,
|
||||
execute=lambda obj: obj.set_owner_scenario(),
|
||||
predicate=lambda obj, data: obj._owner_scenario == source,
|
||||
modifier=lambda obj, data: obj.set_owner_scenario(),
|
||||
data={}
|
||||
)
|
||||
|
||||
if switch:
|
||||
self.status.scenario = new
|
||||
|
||||
self.status.set_as_editable()
|
||||
return new
|
||||
|
|
|
|||
Loading…
Reference in New Issue