Skip to content

Commit de502f7

Browse files
committed
Improved dynamic renaming
Moved renaming of plan regulation group from's title to already existing id check.
1 parent 37d39a1 commit de502f7

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
@@ -161,12 +161,6 @@ def edit_regulation_group(self, regulation_group: RegulationGroup):
161161
def _open_regulation_group_form(self, regulation_group: RegulationGroup):
162162
regulation_group_form = PlanRegulationGroupForm(regulation_group)
163163

164-
# Dynamically rename form title.
165-
if regulation_group == RegulationGroup():
166-
regulation_group_form.setWindowTitle("Luo kaavamääräysryhmä")
167-
else:
168-
regulation_group_form.setWindowTitle("Muokkaa kaavamääräysryhmää")
169-
170164
if regulation_group_form.exec_():
171165
if regulation_group_form.save_as_config:
172166
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
@@ -129,6 +129,7 @@ def __init__(self, regulation_group: RegulationGroup):
129129
layout.addWidget(self.link_label_text)
130130

131131
self.regulation_group_info_tab.layout().insertLayout(1, layout)
132+
self.setWindowTitle("Muokkaa kaavamääräysryhmää")
132133

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

0 commit comments

Comments
 (0)