Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kaavamääräysryhmän lomakkeen otsikon dynaaminen nimeäminen #187

Merged
merged 2 commits into from
Feb 25, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Renames plan regulation group form's title dynamically.
Mtk112 authored and nmaarnio committed Feb 25, 2025
commit bec39734f46a0040b76b6966415b75d2a93c6431
7 changes: 7 additions & 0 deletions arho_feature_template/core/plan_manager.py
Original file line number Diff line number Diff line change
@@ -167,6 +167,13 @@ def edit_regulation_group(self, regulation_group: RegulationGroup):

def _open_regulation_group_form(self, regulation_group: RegulationGroup):
regulation_group_form = PlanRegulationGroupForm(regulation_group, self.active_plan_regulation_group_library)

# Dynamically rename form title.
if regulation_group == RegulationGroup():
regulation_group_form.setWindowTitle("Luo kaavamääräysryhmä")
else:
regulation_group_form.setWindowTitle("Muokkaa kaavamääräysryhmää")

if regulation_group_form.exec_():
if regulation_group_form.save_as_config:
save_regulation_group_as_config(regulation_group_form.model)