From 9142a5ec3f9e9232d47ef09fe4a3c96f39816dc4 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 19 Sep 2013 07:48:22 +0000 Subject: [PATCH] Fix for #15520: wxRichTextCtrl: Drawing the selection doesn't respect its container (dghart) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 57c5b0c131..1877fd7568 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -1840,7 +1840,7 @@ bool wxRichTextParagraphLayoutBox::Draw(wxDC& dc, wxRichTextDrawingContext& cont context.ApplyVirtualAttributes(attr, this); int flags = style; - if (selection.IsValid() && GetParentContainer() != this && selection.WithinSelection(GetRange().GetStart(), GetParentContainer())) + if (selection.IsValid() && GetParentContainer() != this && selection.GetContainer() == this && selection.WithinSelection(GetRange().GetStart(), GetParentContainer())) flags |= wxRICHTEXT_DRAW_SELECTED; // Don't draw guidelines if at top level -- 2.45.2