From db06af0485a2855203218be09294560d46da4e9d Mon Sep 17 00:00:00 2001 From: BrotherShort <129957860+BrotherShort@users.noreply.github.com> Date: Fri, 7 Nov 2025 00:27:08 +0800 Subject: [PATCH] Fix tree item editable area missing icon max width bug --- scene/gui/tree.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 84c6911f5f8..ce2f0fed806 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -4048,12 +4048,7 @@ void Tree::gui_input(const Ref &p_event) { int icon_size_x = 0; Ref icon = get_selected()->get_icon(selected_col); if (icon.is_valid()) { - Rect2i icon_region = get_selected()->get_icon_region(selected_col); - if (icon_region == Rect2i()) { - icon_size_x = icon->get_width(); - } else { - icon_size_x = icon_region.size.width; - } + icon_size_x = _get_cell_icon_size(get_selected()->cells[selected_col]).x; } // Icon is treated as if it is outside of the rect so that double clicking on it will emit the `item_icon_double_clicked` signal. if (rtl) {