mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-21 14:25:36 +00:00
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 3deef64439e0ae8d762fb76bafd46bb3fea0cb16)
This commit is contained in:
parent
ab36d7b600
commit
d58ff8dd0d
@ -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…
x
Reference in New Issue
Block a user