Fix Node can not be reselected

(cherry picked from commit b0c881392a)
This commit is contained in:
ray90514 2021-03-13 00:58:25 +08:00 committed by Rémi Verschelde
parent a33b0c5319
commit 045cf246d4
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -635,8 +635,7 @@ void SceneTreeEditor::_selected_changed() {
} }
void SceneTreeEditor::_deselect_items() { void SceneTreeEditor::_deselect_items() {
// Clear currently selected items in scene tree dock.
// Clear currently elected items in scene tree dock.
if (editor_selection) { if (editor_selection) {
editor_selection->clear(); editor_selection->clear();
emit_signal("node_changed"); emit_signal("node_changed");
@ -1196,6 +1195,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
tree->set_begin(Point2(0, p_label ? 18 : 0)); tree->set_begin(Point2(0, p_label ? 18 : 0));
tree->set_end(Point2(0, 0)); tree->set_end(Point2(0, 0));
tree->add_constant_override("button_margin", 0); tree->add_constant_override("button_margin", 0);
tree->set_allow_reselect(true);
add_child(tree); add_child(tree);