Skip to content

Commit

Permalink
Merge pull request #522 from AntaresSimulatorTeam/dev
Browse files Browse the repository at this point in the history
Fix remove area command
  • Loading branch information
pl-buiquang authored Sep 29, 2021
2 parents e2a1580 + a5b3685 commit f1b2b5d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,12 @@ def _apply(self, study_data: FileStudy) -> CommandOutput:
)

del study_data.config.areas[self.id]
for area_name in study_data.config.areas.keys():
study_data.tree.delete(["input", "links", area_name, self.id])
for area_name, area in study_data.config.areas.items():
for link in area.links.keys():
if link == self.id:
study_data.tree.delete(
["input", "links", area_name, self.id]
)

new_area_data: JSON = {
"input": {
Expand Down

0 comments on commit f1b2b5d

Please sign in to comment.