X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0e6c0513862fc9a33e5800526058193b7492d8b..118322a3dfcc1803bd13df8193ea1be9ae39e653:/src/msw/stattext.cpp?ds=sidebyside diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 12b7403018..0f6faf5e03 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -215,8 +215,8 @@ void wxStaticText::SetLabel(const wxString& label) // disabled if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) ) { + InvalidateBestSize(); DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT); - SetSizeHints(GetSize()); } } @@ -229,8 +229,8 @@ bool wxStaticText::SetFont(const wxFont& font) // disabled if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) ) { + InvalidateBestSize(); DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT); - SetSizeHints(GetSize()); } return ret;