From 9bc5a85b2bd89d35d51bbaa01719a5982fe020e0 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 8 May 2024 11:30:26 +0200 Subject: [PATCH] Fold TreeItems when clicking to the left of fold icon --- scene/gui/tree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index df0bb365e58..e2de585a69c 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2828,7 +2828,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos, int x_ofs, int y_ofs, int return -1; } - if (!p_item->disable_folding && !hide_folding && p_item->first_child && (p_pos.x >= x_ofs && p_pos.x < (x_ofs + theme_cache.item_margin))) { + if (!p_item->disable_folding && !hide_folding && p_item->first_child && (p_pos.x < (x_ofs + theme_cache.item_margin))) { if (enable_recursive_folding && p_mod->is_shift_pressed()) { p_item->set_collapsed_recursive(!p_item->is_collapsed()); } else {