git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74841
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
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