diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index bf456cd04855..ea6dbebd3bd6 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -120,6 +120,10 @@ void TreeItem::_change_tree(Tree *p_tree) { } if (tree->selected_item == this) { + for (int i = 0; i < tree->selected_item->cells.size(); i++) { + tree->selected_item->cells.write[i].selected = false; + } + tree->selected_item = nullptr; }