GUI2/Editor Settings: prevented gamemap being hue-shifted if dialog is closed with a new but not applied ToD

This commit is contained in:
Charles Dang 2013-05-18 03:05:38 +11:00
parent c3612b481a
commit 326a338b0c
2 changed files with 13 additions and 1 deletions

View File

@ -151,6 +151,17 @@ void teditor_settings::update_tod_display(twindow& window)
window.set_dirty(true);
}
void teditor_settings::update_tod_display_fast(twindow& window)
{
// This is simplified version of the update_tod_display function
// It doesn't include the hue shifting and window redraw
if(display_) {
display_->invalidate_all();
// redraw tiles
display_->draw();
}
}
void teditor_settings::slider_update_callback(twindow& window)
{
if (custom_tod_auto_refresh_->get_value()) {
@ -271,7 +282,7 @@ void teditor_settings::pre_show(CVideo& /*video*/, twindow& window)
void teditor_settings::post_show(twindow& window)
{
update_tod_display(window);
update_tod_display_fast(window);
can_update_display_ = false;
}

View File

@ -50,6 +50,7 @@ private:
void do_next_tod(twindow& window);
void update_tod_display(twindow& window);
void update_tod_display_fast(twindow& window);
void slider_update_callback(twindow& window);