summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorray90514 <ray90514@hotmail.com>2021-03-13 00:58:25 +0800
committerray90514 <ray90514@hotmail.com>2021-03-13 22:30:37 +0800
commitb0c881392a66ef7e185db2fe59c997a103a1d357 (patch)
tree70743a1ac654934e43b9606dbad9877765bf02e2
parent4c0ab0780936538bf9fb4bf2f11f61eafdce76d2 (diff)
Fix Node can not be reselected
-rw-r--r--editor/scene_tree_editor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 2d739202fb..e9de91f851 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -626,7 +626,7 @@ void SceneTreeEditor::_selected_changed() {
}
void SceneTreeEditor::_deselect_items() {
- // Clear currently elected items in scene tree dock.
+ // Clear currently selected items in scene tree dock.
if (editor_selection) {
editor_selection->clear();
emit_signal("node_changed");
@@ -1172,6 +1172,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
tree->set_anchor(SIDE_BOTTOM, ANCHOR_END);
tree->set_begin(Point2(0, p_label ? 18 : 0));
tree->set_end(Point2(0, 0));
+ tree->set_allow_reselect(true);
tree->add_theme_constant_override("button_margin", 0);
add_child(tree);