Fix bug #24762: Avoid modifying the event handlers at the wrong time

This resurrects the old check that was used to determine when it was
safe to create the buttons. It avoids it happening as a result of an
actual draw-all event, instead only happening when the GUI is being
updated.
This commit is contained in:
Andreas Löf 2016-07-11 21:36:34 +12:00
parent 6347c646e2
commit 8c94170c46

View file

@ -2668,8 +2668,9 @@ void display::redraw_everything()
theme_.set_resolution(screen_area());
create_buttons();
render_buttons();
if(!menu_buttons_.empty() || !action_buttons_.empty() || !sliders_.empty() ) {
create_buttons();
}
panelsDrawn_ = false;
if (!gui::in_dialog()) {