Skip to content

Commit 6835312

Browse files
committed
Fix active template when feature type changed
1 parent 8c9cf33 commit 6835312

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arho_feature_template/gui/docks/new_feature_dock.py

+4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def set_plan(self, plan_id: str):
7676
def on_active_feature_type_changed(self, feature_name: str, layer_name: str):
7777
self.active_feature_type = feature_name if feature_name else None
7878
self.active_feature_layer = layer_name if layer_name else None
79+
self.clear_template_selection()
7980
self.filter_plan_feature_templates()
8081
if self.active_feature_type:
8182
self.tool_activated.emit()
@@ -115,6 +116,9 @@ def on_template_item_clicked(self, index: int):
115116
def deactivate_and_clear_selections(self):
116117
self.on_active_feature_type_changed("", "")
117118
self.new_feature_grid.clear_selections()
119+
self.clear_template_selection()
120+
121+
def clear_template_selection(self):
118122
self.active_template = None
119123
self.template_list.clearSelection()
120124

0 commit comments

Comments
 (0)