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.
This commit is contained in:
Jyrki Vesterinen 2018-05-19 15:32:06 +03:00
parent 4a3508f13f
commit 3deef64439

View file

@ -686,15 +686,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;
}
}