From 6ccef8b831bf4d98c75201a18e823f581b7c9aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20E=C5=A1kinja?= Date: Sat, 14 Jan 2023 19:04:46 +0100 Subject: [PATCH] Fix for deselecting item when select_mode == SELECT_ROW --- scene/gui/tree.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index f8c2e9f4ad3f..339d8cce19f2 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -4202,6 +4202,10 @@ void Tree::item_deselected(int p_column, TreeItem *p_item) { if (select_mode == SELECT_MULTI || select_mode == SELECT_SINGLE) { p_item->cells.write[p_column].selected = false; + } else if (select_mode == SELECT_ROW) { + for (int i = 0; i < p_item->cells.size(); i++) { + p_item->cells.write[i].selected = false; + } } queue_redraw(); }