From 6539f8630e38978f75dc28d7754c3261ca3c4e9d Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 21 Oct 2013 13:12:16 +0000 Subject: [PATCH] Fix selection drawing for table cells git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index f17f174c46..c223616445 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -1861,8 +1861,12 @@ bool wxRichTextParagraphLayoutBox::Draw(wxDC& dc, wxRichTextDrawingContext& cont AdjustAttributes(attr, context); int flags = style; - if (selection.IsValid() && GetParentContainer() != this && selection.GetContainer() == this && selection.WithinSelection(GetRange().GetStart(), GetParentContainer())) + if (selection.IsValid() && + ((GetParentContainer() != this && selection.GetContainer() == this && selection.WithinSelection(GetRange().GetStart(), GetParentContainer())) || + (selection.WithinSelection(GetRange().GetStart(), this)))) + { flags |= wxRICHTEXT_DRAW_SELECTED; + } // Don't draw guidelines if at top level int theseFlags = flags;