From e66122e0bf049abfff98f59e8a39f1924b5358e5 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Sat, 1 Jun 2019 14:42:13 +0200 Subject: [PATCH] Fixed get_item_at_position being weird (cherry picked from commit 59f403de0bc815d19e59b0445c1a111018a9d339) --- scene/gui/item_list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 026374ded1d..69fb09f64b8 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -1243,7 +1243,7 @@ int ItemList::get_item_at_position(const Point2 &p_pos, bool p_exact) const { Rect2 rc = items[i].rect_cache; if (i % current_columns == current_columns - 1) { - rc.size.width = get_size().width; //not right but works + rc.size.width = get_size().width - rc.position.x; //make sure you can still select the last item when clicking past the column } if (rc.has_point(pos)) {