Skip to content

Commit 5ad1ecd

Browse files
Mtk112nmaarnio
authored andcommitted
Improved dynamic renaming
Moved renaming of plan regulation group from's title to already existing id check.
1 parent bec3973 commit 5ad1ecd

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

arho_feature_template/core/plan_manager.py

-6
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,6 @@ def edit_regulation_group(self, regulation_group: RegulationGroup):
168168
def _open_regulation_group_form(self, regulation_group: RegulationGroup):
169169
regulation_group_form = PlanRegulationGroupForm(regulation_group, self.active_plan_regulation_group_library)
170170

171-
# Dynamically rename form title.
172-
if regulation_group == RegulationGroup():
173-
regulation_group_form.setWindowTitle("Luo kaavamääräysryhmä")
174-
else:
175-
regulation_group_form.setWindowTitle("Muokkaa kaavamääräysryhmää")
176-
177171
if regulation_group_form.exec_():
178172
if regulation_group_form.save_as_config:
179173
save_regulation_group_as_config(regulation_group_form.model)

arho_feature_template/gui/dialogs/plan_regulation_group_form.py

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def __init__(
135135
layout.addWidget(self.link_label_text)
136136

137137
self.regulation_group_info_tab.layout().insertLayout(1, layout)
138+
self.setWindowTitle("Muokkaa kaavamääräysryhmää")
138139

139140
def _initalize_regulation_from_config(self, config: RegulationConfig, parent: QTreeWidgetItem | None = None):
140141
item = self.regulations_selection_widget.add_item_to_tree(config.name, config, parent)

0 commit comments

Comments
 (0)