]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed multiline static texts
authorJulian Smart <julian@anthemion.co.uk>
Fri, 12 Mar 2004 21:44:48 +0000 (21:44 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 12 Mar 2004 21:44:48 +0000 (21:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/stattext.cpp
src/mac/stattext.cpp

index 4c8b9414a478fe4b8818e681550fb5aa101ec922..1c0facdbf70d86610846d12989813d7cef848fd9 100644 (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 {
index 4c8b9414a478fe4b8818e681550fb5aa101ec922..1c0facdbf70d86610846d12989813d7cef848fd9 100644 (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 {