Set selected Tree item to null when deselected
Co-authored-by: Brody Eller <wviper3@gmail.com>
(cherry picked from commit ef8ec59f2f
)
This commit is contained in:
parent
dad0d4a8ee
commit
2863c6117e
1 changed files with 7 additions and 0 deletions
|
@ -3199,6 +3199,13 @@ void Tree::item_selected(int p_column, TreeItem *p_item) {
|
|||
}
|
||||
|
||||
void Tree::item_deselected(int p_column, TreeItem *p_item) {
|
||||
if (selected_item == p_item) {
|
||||
selected_item = NULL;
|
||||
}
|
||||
|
||||
if (selected_col == p_column) {
|
||||
selected_col = -1;
|
||||
}
|
||||
|
||||
if (select_mode == SELECT_MULTI || select_mode == SELECT_SINGLE) {
|
||||
p_item->cells.write[p_column].selected = false;
|
||||
|
|
Loading…
Reference in a new issue