]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for #15520: wxRichTextCtrl: Drawing the selection doesn't respect its container...
authorJulian Smart <julian@anthemion.co.uk>
Thu, 19 Sep 2013 07:48:22 +0000 (07:48 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 19 Sep 2013 07:48:22 +0000 (07:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextbuffer.cpp

index 57c5b0c13170fa1d76ca3205e8fcc7c26479800e..1877fd75689a7db3f68a98dfefe296f86e70c603 100644 (file)
@@ -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