X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c1841ac2e30ca2c4d0cffcc8e60892e01d79ef8e..58fa97d15f22d38bbd1aecaebfe804f8c7129f9d:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 91cf67383e..7d98bcb1ea 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -8106,6 +8106,7 @@ void wxGrid::DrawTextRectangle(wxDC& dc, // Split multi-line text up into an array of strings. // Any existing contents of the string array are preserved. // +// TODO: refactor wxTextFile::Read() and reuse the same code from here void wxGrid::StringToLines( const wxString& value, wxArrayString& lines ) const { int startPos = 0; @@ -8126,15 +8127,15 @@ void wxGrid::StringToLines( const wxString& value, wxArrayString& lines ) const } else { - lines.Add( value.Mid(startPos, pos) ); + lines.Add( tVal.Mid(startPos, pos) ); } startPos += pos + 1; } - if ( startPos < (int)value.length() ) + if ( startPos < (int)tVal.length() ) { - lines.Add( value.Mid( startPos ) ); + lines.Add( tVal.Mid( startPos ) ); } }