Fix crash when selecting re-added `Tree` item
(cherry picked from commit f7c1c83daa
)
This commit is contained in:
parent
e771e2e379
commit
696e9e04d9
|
@ -112,6 +112,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue