Listbox: don't try to keep the selected item visible (#3016)

@Vultraz stated in Discord that list box should keep the scroll position
instead.

Resolves #3016.

(cherry-picked from commit 3deef64439)
This commit is contained in:
Jyrki Vesterinen 2018-05-19 15:32:06 +03:00
parent ab36d7b600
commit d58ff8dd0d

View file

@ -704,15 +704,6 @@ void listbox::layout_children(const bool force)
content_grid()->set_visible_rectangle(visible);
if(selected_item != -1) {
SDL_Rect rect = generator_->item(selected_item).get_rectangle();
rect.x = visible.x;
rect.w = visible.w;
show_content_rect(rect);
}
need_layout_ = false;
set_is_dirty(true);
}