From cf28e77ca744d5eb3444d06089f1e7cc26f3a4cd Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 21 Jul 2016 13:38:39 +0000 Subject: [PATCH] RichText fixed issue with screen texts git-svn-id: svn://ultimatepp.org/upp/trunk@10088 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/RichText/TxtPaint.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/uppsrc/RichText/TxtPaint.cpp b/uppsrc/RichText/TxtPaint.cpp index 2dc40d117..e95948002 100644 --- a/uppsrc/RichText/TxtPaint.cpp +++ b/uppsrc/RichText/TxtPaint.cpp @@ -126,8 +126,11 @@ void RichTxt::Advance(int parti, RichContext& rc, RichContext& begin) const if(rc.py.y > rc.page.bottom) rc.Page(); } - else - rc.py.y += pp.before + pp.cy + pp.after + pp.ruler; + else { + rc.py.y += pp.before; + begin = rc; + rc.py.y += pp.cy + pp.after + pp.ruler; + } } } @@ -187,6 +190,7 @@ void RichTxt::Paint(PageDraw& pw, RichContext& rc, const PaintInfo& _pi) const } RichContext begin; RichContext next = GetAdvanced(parti, rc, begin); + DDUMP(rc.py); if(next.py >= pi.top) { RichPara p = Get(parti, *rc.styles, true); if(pi.spellingchecker) {