From 9b7d3c09883392271af57f440f41ea6f2208ab55 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 6 May 2006 15:33:23 +0000 Subject: [PATCH] blank lines were ignored in multiline cell labels (replaces patch 1476165) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/generic/grid.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 62cd9e56d7..41e4a7668b 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -130,6 +130,7 @@ All (GUI): wxHtmlListBox::OnLinkClicked() to take advantage of it. - Added an easier to use wxMenu::AppendSubMenu() - wxString <-> wxColour conversions in wxColour class (Francesco Montorsi). +- Fixed bug with ignoring blank lines in multiline wxGrid cell labels wxMSW: diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 385a1cf310..81140534de 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -7606,6 +7606,12 @@ void wxGrid::DrawTextRectangle(wxDC& dc, { const wxString& line = lines[l]; + if ( line.empty() ) + { + *(textOrientation == wxHORIZONTAL ? &y : &x) += dc.GetCharHeight(); + continue; + } + long lineWidth, lineHeight; dc.GetTextExtent(line, &lineWidth, &lineHeight); -- 2.47.2