diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-02 21:11:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-02 21:11:53 +0200 |
commit | a25e52fb72dbf86e2af1787704ce6041e7b86799 (patch) | |
tree | 81e0b566c4faf00bd9b3ee48900a4dd511bf7ec5 /scene | |
parent | 688933ea18fa1da136927da9a3615945379f0fd1 (diff) | |
parent | 59f403de0bc815d19e59b0445c1a111018a9d339 (diff) |
Merge pull request #29378 from KoBeWi/why
Fixed get_item_at_position being weird
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/item_list.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index eaa4c57a2c..91b76839d7 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -1260,7 +1260,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)) { |