From: Julian Smart Date: Sun, 30 Oct 2011 13:34:43 +0000 (+0000) Subject: Add indents to maximum size to prevent problems with paragraph layout (fixes #13458). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/031b5b0c2f1a900b7dc3484ce229dc5e0d445ed0 Add indents to maximum size to prevent problems with paragraph layout (fixes #13458). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 946c96c1a7..17bcf87601 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -4722,7 +4722,7 @@ bool wxRichTextParagraph::Layout(wxDC& dc, const wxRect& rect, int style) // this size. TODO: take into account line breaks. { wxRect marginRect, borderRect, contentRect, paddingRect, outlineRect; - contentRect = wxRect(wxPoint(0, 0), wxSize(paraSize.x, currentPosition.y + spaceAfterPara)); + contentRect = wxRect(wxPoint(0, 0), wxSize(paraSize.x + wxMax(leftIndent, leftIndent + leftSubIndent) + rightIndent, currentPosition.y + spaceAfterPara)); GetBoxRects(dc, buffer, GetAttributes(), marginRect, borderRect, contentRect, paddingRect, outlineRect); SetMaxSize(marginRect.GetSize()); }