From: Vincent van Ravesteijn Date: Wed, 19 Aug 2009 22:43:52 +0000 (+0000) Subject: Fix the painting of the last character of a paragraph. That is either the added/delet... X-Git-Tag: 2.0.0~5638 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=41c1dcdc27b6b3c9f3dfd80658f4e6d73a25f0b8;p=features.git Fix the painting of the last character of a paragraph. That is either the added/deleted paragraph breaks in change tracking or the to-be introduced pilcrow marks. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31154 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 25f3f64c6b..9f0261be0b 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -2153,11 +2153,16 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y) co rp.paintAppendix(); rp.paintDepthBar(); rp.paintChangeBar(); - if (i == 0) + bool const is_rtl = text_->isRTL(text_->getPar(pit)); + if (i == 0 && !is_rtl) rp.paintFirst(); + if (i == nrows - 1 && is_rtl) + rp.paintLast(); rp.paintText(); - if (i == nrows - 1) + if (i == nrows - 1 && !is_rtl) rp.paintLast(); + if (i == 0 && is_rtl) + rp.paintFirst(); y += row.descent(); // Restore full_repaint status. pi.full_repaint = tmp;