mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 20:25:27 +00:00
GUI2/Editor Settings: prevented gamemap being hue-shifted if dialog is closed with a new but not applied ToD
This commit is contained in:
parent
c3612b481a
commit
326a338b0c
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user