From 00527d0588731a516e3b0baf3be3144786ce2c3b Mon Sep 17 00:00:00 2001 From: Giganzo <158825920+Giganzo@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:09:38 +0100 Subject: [PATCH] Fix Tree hover position with multiple columns --- scene/gui/tree.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 8ecc475805b..cd6c51de4b2 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -5487,15 +5487,14 @@ Tree::FindColumnButtonResult Tree::_find_column_and_button_at_pos(int p_x, const } } - if (x > col_width) { - col_ofs += col_width; - x -= col_width; - limit_w -= col_width; - continue; + if (x < col_width) { + col = i; + break; } - col = i; - break; + col_ofs += col_width; + x -= col_width; + limit_w -= col_width; } if (col >= 0) {