git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25623
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
SetTitle( st ) ;
m_label = st ;
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
SetTitle( st ) ;
m_label = st ;
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
+ {
+ // temporary fix until layout measurement and drawing are in synch again
+ Refresh() ;
SetSize( GetBestSize() ) ;
SetSize( GetBestSize() ) ;
{
bool ret = wxControl::SetFont(font);
{
bool ret = wxControl::SetFont(font);
- // adjust the size of the window to fit to the label unless autoresizing is
- // disabled
- if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
- SetSize( GetBestSize() );
+ if ( ret )
+ {
+ // adjust the size of the window to fit to the label unless autoresizing is
+ // disabled
+ if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
+ {
+ // temporary fix until layout measurement and drawing are in synch again
+ Refresh() ;
+ SetSize( GetBestSize() );
+ }
+ }
SetTitle( st ) ;
m_label = st ;
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
SetTitle( st ) ;
m_label = st ;
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
+ {
+ // temporary fix until layout measurement and drawing are in synch again
+ Refresh() ;
SetSize( GetBestSize() ) ;
SetSize( GetBestSize() ) ;
{
bool ret = wxControl::SetFont(font);
{
bool ret = wxControl::SetFont(font);
- // adjust the size of the window to fit to the label unless autoresizing is
- // disabled
- if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
- SetSize( GetBestSize() );
+ if ( ret )
+ {
+ // adjust the size of the window to fit to the label unless autoresizing is
+ // disabled
+ if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
+ {
+ // temporary fix until layout measurement and drawing are in synch again
+ Refresh() ;
+ SetSize( GetBestSize() );
+ }
+ }