]> git.saurik.com Git - wxWidgets.git/commitdiff
Add indents to maximum size to prevent problems with paragraph layout (fixes #13458).
authorJulian Smart <julian@anthemion.co.uk>
Sun, 30 Oct 2011 13:34:43 +0000 (13:34 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 30 Oct 2011 13:34:43 +0000 (13:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextbuffer.cpp

index 946c96c1a75bcd06f4ca1a43743631fc3373076e..17bcf876015a64bae9e41e4698f31b1b0446c748 100644 (file)
@@ -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());
     }