Merge branch 'guifixes' of github.com:wesnoth/wesnoth into guifixes

This commit is contained in:
Andreas Löf 2016-02-28 23:17:32 +13:00
commit 2ad8939de7
4 changed files with 3 additions and 11 deletions

View File

@ -175,7 +175,8 @@ void context_manager::refresh_all()
gui_.rebuild_all();
get_map_context().set_needs_terrain_rebuild(false);
gui_.create_buttons();
gui_.redraw_everything();
gui_.invalidate_all();
gui_.draw(false);
get_map_context().clear_changed_locations();
gui_.recalculate_minimap();
}

View File

@ -1068,8 +1068,6 @@ void game_launcher::show_preferences()
{
preferences::show_preferences_dialog(video(),
game_config_manager::get()->game_config());
video().flip();
}
void game_launcher::launch_game(RELOAD_GAME_DATA reload)

View File

@ -118,7 +118,6 @@ help_manager::~help_manager()
void show_help(CVideo& video, const std::string& show_topic, int xloc, int yloc)
{
show_help(video, toplevel, show_topic, xloc, yloc);
video.flip();
}
/**
@ -130,7 +129,6 @@ void show_unit_help(CVideo& video, const std::string& show_topic, bool has_varia
{
show_help(video, toplevel,
hidden_symbol(hidden) + (has_variations ? ".." : "") + unit_prefix + show_topic, xloc, yloc);
video.flip();
}
/**
@ -141,7 +139,6 @@ void show_unit_help(CVideo& video, const std::string& show_topic, bool has_varia
void show_terrain_help(CVideo& video, const std::string& show_topic, bool hidden, int xloc, int yloc)
{
show_help(video, toplevel, hidden_symbol(hidden) + terrain_prefix + show_topic, xloc, yloc);
video.flip();
}
@ -152,7 +149,6 @@ void show_terrain_help(CVideo& video, const std::string& show_topic, bool hidden
void show_variation_help(CVideo& video, const std::string& unit, const std::string &variation, bool hidden, int xloc, int yloc)
{
show_help(video, toplevel, hidden_symbol(hidden) + variation_prefix + unit + "_" + variation, xloc, yloc);
video.flip();
}
/**
@ -221,7 +217,6 @@ void show_help(CVideo& video, const section &toplevel_sec,
}
hb.set_dirty(true);
events::raise_draw_event();
video.flip();
CKey key;
for (;;) {
events::pump();

View File

@ -616,14 +616,12 @@ void hotkey_preferences_dialog::show_binding_dialog(
#if SDL_VERSION_ATLEAST(2,0,0)
events::peek_for_resize();
#endif
video_.flip();
CVideo::delay(10);
} while (event.type != SDL_KEYUP && event.type != SDL_JOYBUTTONUP
&& event.type != SDL_JOYHATMOTION
&& event.type != SDL_MOUSEBUTTONUP);
restorer.restore();
video_.flip();
// only if not cancelled.
if (!(keycode == SDLK_ESCAPE && (mod & any_mod) == 0)) {