making sure it is only breaking at newlines for measuring

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44204 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2007-01-12 18:00:01 +00:00
parent 8d206c073d
commit 4b6930c813

View File

@ -78,7 +78,10 @@ wxSize wxStaticText::DoGetBestSize() const
Point bounds;
// try the built-in best size if available
Boolean former = m_peer->GetData<Boolean>( kControlStaticTextIsMultilineTag);
m_peer->SetData( kControlStaticTextIsMultilineTag, (Boolean)0 );
m_peer->GetBestRect( &bestsize ) ;
m_peer->SetData( kControlStaticTextIsMultilineTag, former );
if ( !EmptyRect( &bestsize ) )
{
bounds.h = bestsize.right - bestsize.left ;