From: Vadim Zeitlin Date: Wed, 7 Mar 2007 19:40:08 +0000 (+0000) Subject: merge multiple lines into one as otherwise the display is corrupted/unreadable X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/359fb29e43d6ba4283c38de4bacf52134ab8dfa7 merge multiple lines into one as otherwise the display is corrupted/unreadable git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44633 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index c485403edb..4f80b3a840 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1590,12 +1590,17 @@ void wxListLineData::DrawInReportMode( wxDC *dc, } void wxListLineData::DrawTextFormatted(wxDC *dc, - const wxString &text, + const wxString& textOrig, int col, int x, int yMid, int width) { + // we don't support displaying multiple lines currently (and neither does + // wxMSW FWIW) so just merge all the lines + wxString text(textOrig); + text.Replace(_T("\n"), _T(" ")); + wxCoord w, h; dc->GetTextExtent(text, &w, &h);