]> git.lyx.org Git - features.git/commitdiff
Fix the painting of the last character of a paragraph. That is either the added/delet...
authorVincent van Ravesteijn <vfr@lyx.org>
Wed, 19 Aug 2009 22:43:52 +0000 (22:43 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Wed, 19 Aug 2009 22:43:52 +0000 (22:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31154 a592a061-630c-0410-9148-cb99ea01b6c8

src/TextMetrics.cpp

index 25f3f64c6b91a1a8dea3dc93ea35b65ebb4c47b0..9f0261be0b440038d457f09ae57c57ec02dfc1c3 100644 (file)
@@ -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;