Skip to content

Commit 8807c33

Browse files
committed
fix plan feature digitizing without selected plan feature type
Now plan feature type button does not toggle off by pressing it again, so clearing selection requires user to change map tool
1 parent c5dd12a commit 8807c33

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

arho_feature_template/gui/components/new_feature_grid_widget.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,11 @@ def update_height(self):
5656
self.setFixedHeight(new_height)
5757

5858
def handle_button_click(self, btn: FeatureButton):
59-
# Clear other button selections
60-
self.clear_selections(btn)
59+
self.clear_selections(exclude=btn)
6160

6261
# Map button texts to layer names
63-
if btn.isChecked():
64-
self.active_feature_type_changed.emit(btn.text(), FEATURE_TYPE_TO_LAYER_NAME[btn.text()])
65-
else:
66-
self.active_feature_type_changed.emit("", "")
62+
btn.setChecked(True)
63+
self.active_feature_type_changed.emit(btn.text(), FEATURE_TYPE_TO_LAYER_NAME[btn.text()])
6764

6865
def clear_selections(self, exclude: FeatureButton | None = None):
6966
for btn in self.buttons.values():

0 commit comments

Comments
 (0)