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) {