Merge pull request #112475 from BrotherShort/fix-icon-max-width-editable

Fix tree item editable area missing icon max width bug
This commit is contained in:
Rémi Verschelde
2026-01-01 16:45:47 +01:00

View File

@@ -4053,12 +4053,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
int icon_size_x = 0;
Ref<Texture2D> 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) {