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

Korjaa kaavakohteen digitointi ilman kaavakohteen tyypin valintaa #163

Merged
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,11 @@ def update_height(self):
self.setFixedHeight(new_height)

def handle_button_click(self, btn: FeatureButton):
# Clear other button selections
self.clear_selections(btn)
self.clear_selections(exclude=btn)

# Map button texts to layer names
if btn.isChecked():
self.active_feature_type_changed.emit(btn.text(), FEATURE_TYPE_TO_LAYER_NAME[btn.text()])
else:
self.active_feature_type_changed.emit("", "")
btn.setChecked(True)
self.active_feature_type_changed.emit(btn.text(), FEATURE_TYPE_TO_LAYER_NAME[btn.text()])

def clear_selections(self, exclude: FeatureButton | None = None):
for btn in self.buttons.values():
Expand Down
Loading