Skip to content

Commit bec3973

Browse files
Mtk112nmaarnio
authored andcommitted
Renames plan regulation group form's title dynamically.
1 parent c760651 commit bec3973

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arho_feature_template/core/plan_manager.py

+7
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ def edit_regulation_group(self, regulation_group: RegulationGroup):
167167

168168
def _open_regulation_group_form(self, regulation_group: RegulationGroup):
169169
regulation_group_form = PlanRegulationGroupForm(regulation_group, self.active_plan_regulation_group_library)
170+
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+
170177
if regulation_group_form.exec_():
171178
if regulation_group_form.save_as_config:
172179
save_regulation_group_as_config(regulation_group_form.model)

0 commit comments

Comments
 (0)