diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-05 09:22:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-05 09:22:00 +0100 |
commit | 89f070065b8e21b106afa53e3e35eb9fb5dc9bc8 (patch) | |
tree | ee555200615de8860f295671498ea62a19a9bfb4 /scene/gui | |
parent | d0cd21186520062d6289fe74ee305d1124d52daa (diff) | |
parent | 185724e5e95a4044ac0db857fa6d237907817237 (diff) |
Merge pull request #56408 from eazrael/tree-fix-selectionmode-row
Tree: Fix de-select when selection mode set to SELECT_ROW
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/tree.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 69ac36ff99..7134d7f371 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2195,8 +2195,10 @@ void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_c */ } else if (c.selected) { - c.selected = false; - //p_current->deselected_signal.call(p_col); + if (p_selected != p_current) { + // Deselect other rows. + c.selected = false; + } } } else if (select_mode == SELECT_SINGLE || select_mode == SELECT_MULTI) { if (!r_in_range && &selected_cell == &c) { |