Fixed layout and hit-testing problem particularly with centred lines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1870,6 +1870,10 @@ bool wxRichTextParagraphLayoutBox::Layout(wxDC& dc, wxRichTextDrawingContext& co
|
||||
availableSpace = GetAvailableContentArea(dc, context, rect);
|
||||
}
|
||||
|
||||
// Fix the width if we're at the top level
|
||||
if (!GetParent())
|
||||
attr.GetTextBoxAttr().GetWidth().SetValue(rect.GetWidth(), wxTEXT_ATTR_UNITS_PIXELS);
|
||||
|
||||
int leftMargin, rightMargin, topMargin, bottomMargin;
|
||||
wxRichTextObject::GetTotalMargin(dc, GetBuffer(), attr, leftMargin, rightMargin,
|
||||
topMargin, bottomMargin);
|
||||
|
Reference in New Issue
Block a user