diff options
author | kobewi <kobewi4e@gmail.com> | 2021-02-16 01:36:16 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2021-02-16 01:36:16 +0100 |
commit | 282639d6533a51ed395253ee72a9473b326f0b11 (patch) | |
tree | 62e52e4c9592830d96b2a225e0e5223312344fc4 | |
parent | f14008b600ff091a07d9dcb53780e9374f36d47f (diff) |
Select TreeItem if none is selected
-rw-r--r-- | scene/gui/tree.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index c9bc38c36a..ad06739da9 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -3342,6 +3342,9 @@ void Tree::item_selected(int p_column, TreeItem *p_item) { //emit_signal("multi_selected",p_item,p_column,true); - NO this is for TreeItem::select selected_col = p_column; + if (!selected_item) { + selected_item = p_item; + } } else { select_single_item(p_item, root, p_column); } |