cosmetics.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24770 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-05-14 15:24:36 +00:00
parent ffc1002291
commit fb8914b9ca

View File

@ -304,19 +304,20 @@ void RowPainter::paintChars(pos_type & vpos, FontInfo const & font,
docstring s(&str[0], str.size()); docstring s(&str[0], str.size());
if (selection || prev_change != Change::UNCHANGED) { if (!selection && prev_change == Change::UNCHANGED) {
FontInfo copy = font;
if (selection) {
copy.setColor(Color_selectiontext);
} else if (prev_change == Change::DELETED) {
copy.setColor(Color_deletedtext);
} else if (prev_change == Change::INSERTED) {
copy.setColor(Color_addedtext);
}
x_ += pi_.pain.text(int(x_), yo_, s, copy);
} else {
x_ += pi_.pain.text(int(x_), yo_, s, font); x_ += pi_.pain.text(int(x_), yo_, s, font);
return;
} }
FontInfo copy = font;
if (selection)
copy.setColor(Color_selectiontext);
else if (prev_change == Change::DELETED)
copy.setColor(Color_deletedtext);
else if (prev_change == Change::INSERTED)
copy.setColor(Color_addedtext);
x_ += pi_.pain.text(int(x_), yo_, s, copy);
} }