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:
parent
1caadc2793
commit
c364952272
1 changed files with 0 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue