mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-17 22:18:56 +00:00
MP create: fix scrollbar not appearing in the SP campaign list
It turned out that in AUTO_VISIBLE_FIRST_RUN mode, scrollbar_container expects the scrollbar to be either visible or invisible. The code I added in commit 9b1ca36b5c8ad353daf5881d65adfd8ba843381c made the scrollbar hidden instead, which prevented a full relayout from occurring if the content grew afterwards. Showing the scrollbar, in turn, depends on full relayout. This issue only affected listboxes and not scroll labels, which is why I didn't initially notice it.
This commit is contained in:
parent
9b1ca36b5c
commit
74083a2f89
@ -376,7 +376,7 @@ set_scrollbar_mode(grid* scrollbar_grid,
|
||||
} else if(scrollbar_mode == scrollbar_container::AUTO_VISIBLE_FIRST_RUN) {
|
||||
if(items <= visible_items && content_grid != nullptr &&
|
||||
scrollbar_grid->get_visible() == widget::visibility::visible) {
|
||||
scrollbar_grid->set_visible(widget::visibility::hidden);
|
||||
scrollbar_grid->set_visible(widget::visibility::invisible);
|
||||
// Give newly freed space to the items.
|
||||
content_grid->layout_initialise(false);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user