Invalidate the cached layout properly.

When the label of a control changes its best size probably also will so
invalidate the cached value. This fixes an issue where items added to
the mp chat log weren't shown until the next layout invalidation.
This commit is contained in:
Mark de Wever 2010-03-07 18:43:46 +00:00
parent 93bf9e850c
commit 21d6b17e0c
2 changed files with 2 additions and 0 deletions

View File

@ -31,6 +31,7 @@ Version 1.7.13+svn:
* Fix the empty games in the MP lobby game list
* Fix redraw glitches of the scrollbars when resizing a widget
* Fix a crash when using the scrollwheel (bug #15156)
* Fix an issue where the lobby chat log didn't resize properly
* Miscellaneous and bug fixes:
* Fix bug #15429 (Units created by WML can only get the Neutral alignment);
this also affected MP leaders

View File

@ -228,6 +228,7 @@ void tcontrol::set_label(const t_string& label)
}
label_ = label;
set_layout_size(tpoint(0, 0));
update_canvas();
set_dirty();
}