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:
parent
ab36d7b600
commit
d58ff8dd0d
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