Merge pull request #29378 from KoBeWi/why

Fixed get_item_at_position being weird
This commit is contained in:
Rémi Verschelde 2019-06-02 21:11:53 +02:00 committed by GitHub
commit a25e52fb72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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