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
This commit is contained in:
Vadim Zeitlin 2006-05-06 15:33:23 +00:00
parent 4330c974ed
commit 9b7d3c0988
2 changed files with 7 additions and 0 deletions

View 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:

View 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);