]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't redraw borders for cells that are hidden - fixes drawing glitch in sample
authorJulian Smart <julian@anthemion.co.uk>
Sun, 29 Sep 2013 14:01:16 +0000 (14:01 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 29 Sep 2013 14:01:16 +0000 (14:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextbuffer.cpp

index 7ffc2cc3b4eccacaa53be5de8610a5a21bd28e72..98c2e3979ee19a10d4b7067fbc7f7d1b4065626e 100644 (file)
@@ -9375,8 +9375,6 @@ bool wxRichTextTable::Draw(wxDC& dc, wxRichTextDrawingContext& context, const wx
 {
     wxRichTextBox::Draw(dc, context, range, selection, rect, descent, style);
 
-    // Now draw the table outline, if any, to ensure there are no breaks caused by
-    // different-coloured cell dividers overwriting the overall table border.
     int colCount = GetColumnCount();
     int rowCount = GetRowCount();
     int col, row;
@@ -9387,7 +9385,7 @@ bool wxRichTextTable::Draw(wxDC& dc, wxRichTextDrawingContext& context, const wx
             if (row == 0 || row == (rowCount-1) || col == 0 || col == (colCount-1))
             {
                 wxRichTextCell* cell = GetCell(row, col);
-                if (cell && !cell->GetRange().IsOutside(range))
+                if (cell && cell->IsShown() && !cell->GetRange().IsOutside(range))
                 {
                     wxRect childRect(cell->GetPosition(), cell->GetCachedSize());
                     wxRichTextAttr attr(cell->GetAttributes());