Fixed multiline static texts

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2004-03-12 21:44:48 +00:00
parent 951aa70eb4
commit 8da2ab9900
2 changed files with 4 additions and 4 deletions

View File

@ -186,7 +186,7 @@ wxSize wxStaticText::DoGetBestSize() const
wxString curLine;
for ( const wxChar *pc = m_label; ; pc++ )
{
if ( *pc == wxT('\n') || *pc == wxT('\0') )
if ( *pc == wxT('\n') || *pc == wxT('\r') || *pc == wxT('\0') )
{
if ( !curLine )
{
@ -212,7 +212,7 @@ wxSize wxStaticText::DoGetBestSize() const
heightTextTotal++; // FIXME: why is this necessary?
}
if ( *pc == wxT('\n') ) {
if ( *pc == wxT('\n') || *pc == wxT('\r')) {
curLine.Empty();
}
else {

View File

@ -186,7 +186,7 @@ wxSize wxStaticText::DoGetBestSize() const
wxString curLine;
for ( const wxChar *pc = m_label; ; pc++ )
{
if ( *pc == wxT('\n') || *pc == wxT('\0') )
if ( *pc == wxT('\n') || *pc == wxT('\r') || *pc == wxT('\0') )
{
if ( !curLine )
{
@ -212,7 +212,7 @@ wxSize wxStaticText::DoGetBestSize() const
heightTextTotal++; // FIXME: why is this necessary?
}
if ( *pc == wxT('\n') ) {
if ( *pc == wxT('\n') || *pc == wxT('\r')) {
curLine.Empty();
}
else {