]> git.saurik.com Git - wxWidgets.git/commitdiff
blank lines were ignored in multiline cell labels (replaces patch 1476165)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 6 May 2006 15:33:23 +0000 (15:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 6 May 2006 15:33:23 +0000 (15:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/generic/grid.cpp

index 62cd9e56d764bdba260ba7fb6f6eaf8f8f5cb8a7..41e4a7668b62efdb3df7e457620fa9d9e081efdb 100644 (file)
@@ -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:
 
index 385a1cf3107eb7e1a8ec46ab0982c4b17ee1a0f8..81140534de100c8c084fb3f4af86ddbbca9c71d3 100644 (file)
@@ -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);