mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 22:43:54 +00:00
Fix the not properly drawing glitch.
When a window is closed the other dispatchers need to be set dirty so they really redraw themselves the next drawing cycle.
This commit is contained in:
parent
c1634e23d4
commit
a6430e08f6
@ -320,10 +320,12 @@ void thandler::connect(tdispatcher* dispatcher)
|
||||
|
||||
void thandler::disconnect(tdispatcher* dispatcher)
|
||||
{
|
||||
/***** Validate pre conditions. *****/
|
||||
std::vector<tdispatcher*>::iterator itor =
|
||||
std::find(dispatchers_.begin(), dispatchers_.end(), dispatcher);
|
||||
assert(itor != dispatchers_.end());
|
||||
|
||||
/***** Remove dispatcher. *****/
|
||||
dispatchers_.erase(itor);
|
||||
|
||||
if(dispatcher == mouse_focus) {
|
||||
@ -333,6 +335,12 @@ void thandler::disconnect(tdispatcher* dispatcher)
|
||||
keyboard_focus_ = NULL;
|
||||
}
|
||||
|
||||
/***** Set proper state for the other dispatchers. *****/
|
||||
foreach(tdispatcher* dispatcher, dispatchers_) {
|
||||
dynamic_cast<twidget&>(*dispatcher).set_dirty();
|
||||
}
|
||||
|
||||
/***** Validate post conditions. *****/
|
||||
assert(std::find(dispatchers_.begin(), dispatchers_.end(), dispatcher)
|
||||
== dispatchers_.end());
|
||||
#ifndef GUI2_OLD_EVENT_HANDLING
|
||||
|
@ -191,9 +191,6 @@ void tmp_connect::show_server_list(twindow& window)
|
||||
if(dlg.get_retval() == twindow::OK) {
|
||||
host_name_->set_widget_value(window, dlg.host_name());
|
||||
}
|
||||
|
||||
/** @todo FIXME hack to force redraw. */
|
||||
window.invalidate_layout();
|
||||
}
|
||||
|
||||
/*WIKI
|
||||
|
Loading…
x
Reference in New Issue
Block a user