From 194e8b50112f8ad9d9f746ebc40872b9f83af5c4 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 27 Feb 2014 15:14:44 +0000 Subject: [PATCH] Paragraph layout fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 17d727401d..eb703153cf 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -5157,7 +5157,7 @@ bool wxRichTextParagraph::Layout(wxDC& dc, wxRichTextDrawingContext& context, co // Add the last line - it's the current pos -> last para pos // Substract -1 because the last position is always the end-paragraph position. - if (lastCompletedEndPos <= GetRange().GetEnd()-1) + if ((lastCompletedEndPos < GetRange().GetEnd()-1) || lineCount == 0) { int startOffset = (lineCount == 0 ? startPositionFirstLine : startPositionSubsequentLines); availableRect = wxRect(rect.x + startOffset, rect.y + currentPosition.y,