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:
@@ -186,7 +186,7 @@ wxSize wxStaticText::DoGetBestSize() const
|
|||||||
wxString curLine;
|
wxString curLine;
|
||||||
for ( const wxChar *pc = m_label; ; pc++ )
|
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 )
|
if ( !curLine )
|
||||||
{
|
{
|
||||||
@@ -212,7 +212,7 @@ wxSize wxStaticText::DoGetBestSize() const
|
|||||||
heightTextTotal++; // FIXME: why is this necessary?
|
heightTextTotal++; // FIXME: why is this necessary?
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( *pc == wxT('\n') ) {
|
if ( *pc == wxT('\n') || *pc == wxT('\r')) {
|
||||||
curLine.Empty();
|
curLine.Empty();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -186,7 +186,7 @@ wxSize wxStaticText::DoGetBestSize() const
|
|||||||
wxString curLine;
|
wxString curLine;
|
||||||
for ( const wxChar *pc = m_label; ; pc++ )
|
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 )
|
if ( !curLine )
|
||||||
{
|
{
|
||||||
@@ -212,7 +212,7 @@ wxSize wxStaticText::DoGetBestSize() const
|
|||||||
heightTextTotal++; // FIXME: why is this necessary?
|
heightTextTotal++; // FIXME: why is this necessary?
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( *pc == wxT('\n') ) {
|
if ( *pc == wxT('\n') || *pc == wxT('\r')) {
|
||||||
curLine.Empty();
|
curLine.Empty();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user