From 2d9def657726675b5bf8aaab762af6d44bc086ae Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 28 Jul 2008 14:58:29 +0000 Subject: [PATCH] Fix http://bugzilla.lyx.org/show_bug.cgi?id=5021 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25931 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/rowpainter.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp index 8ef3b6f310..4555250144 100644 --- a/src/rowpainter.cpp +++ b/src/rowpainter.cpp @@ -312,12 +312,12 @@ void RowPainter::paintChars(pos_type & vpos, FontInfo const & font, } FontInfo copy = font; - if (selection) - copy.setColor(Color_selectiontext); - else if (change_type == Change::DELETED) + if (change_type == Change::DELETED) copy.setColor(Color_deletedtext); else if (change_type == Change::INSERTED) copy.setColor(Color_addedtext); + else if (selection) + copy.setColor(Color_selectiontext); x_ += pi_.pain.text(int(x_), yo_, s, copy); } @@ -338,6 +338,13 @@ void RowPainter::paintForeignMark(double orig_x, Language const * lang, } +void RowPainter::paintMisspelledMark(double orig_x, int desc) +{ + int const y = yo_ + desc; + pi_.pain.wavyHorizontalLine(int(orig_x), y, int(x_) - int(orig_x), Color_red); +} + + void RowPainter::paintFromPos(pos_type & vpos) { pos_type const pos = bidi_.vis2log(vpos); @@ -365,6 +372,8 @@ void RowPainter::paintFromPos(pos_type & vpos) } paintForeignMark(orig_x, orig_font.language()); + if (orig_font.isMisspelled()) + paintMisspelledMark(orig_x, 3); } -- 2.39.2