Tree: Fix de-select when selection mode set to SELECT_ROW

It no longer de-selects an already selected row if the SELECT_MODE is
set to SELECT_ROW.

Update scene/gui/tree.cpp

Co-authored-by: Michael Alexsander <michaelalexsander@protonmail.com>
This commit is contained in:
Christoph Nelles 2022-01-01 21:36:18 +01:00 committed by none@none
parent bc2445d0eb
commit 185724e5e9
1 changed files with 4 additions and 2 deletions

View File

@ -2195,8 +2195,10 @@ void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_c
*/
} else if (c.selected) {
if (p_selected != p_current) {
// Deselect other rows.
c.selected = false;
//p_current->deselected_signal.call(p_col);
}
}
} else if (select_mode == SELECT_SINGLE || select_mode == SELECT_MULTI) {
if (!r_in_range && &selected_cell == &c) {