mirror of https://github.com/godotengine/godot
Fix tree item editable area missing icon max width bug
This commit is contained in:
parent
cb3af5afff
commit
db06af0485
|
|
@ -4048,12 +4048,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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue