From 46e7a90e471c98747e9036f84e12724b61bdbe7b Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 27 Oct 2006 14:32:55 +0000 Subject: [PATCH] Pagination fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextbuffer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 2c03c59d5f..a73d8825d0 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -531,7 +531,7 @@ bool wxRichTextParagraphLayoutBox::Draw(wxDC& dc, const wxRichTextRange& range, // Skip } else - child->Draw(dc, child->GetRange(), selectionRange, childRect, descent, style); + child->Draw(dc, range, selectionRange, childRect, descent, style); } node = node->GetNext(); @@ -2996,7 +2996,7 @@ wxRichTextParagraph::~wxRichTextParagraph() } /// Draw the item -bool wxRichTextParagraph::Draw(wxDC& dc, const wxRichTextRange& WXUNUSED(range), const wxRichTextRange& selectionRange, const wxRect& WXUNUSED(rect), int WXUNUSED(descent), int style) +bool wxRichTextParagraph::Draw(wxDC& dc, const wxRichTextRange& range, const wxRichTextRange& selectionRange, const wxRect& WXUNUSED(rect), int WXUNUSED(descent), int style) { #if wxRICHTEXT_USE_DYNAMIC_STYLES wxTextAttrEx attr = GetCombinedAttributes(); @@ -3081,7 +3081,8 @@ bool wxRichTextParagraph::Draw(wxDC& dc, const wxRichTextRange& WXUNUSED(range), while (node2) { wxRichTextObject* child = node2->GetData(); - if (!child->GetRange().IsOutside(lineRange)) + + if (!child->GetRange().IsOutside(lineRange) && !lineRange.IsOutside(range)) { // Draw this part of the line at the correct position wxRichTextRange objectRange(child->GetRange()); -- 2.45.2