- if (prev_change == Change::DELETED)
- font.setColor(LColor::strikeout);
- else if (prev_change == Change::INSERTED)
- font.setColor(LColor::newtext);
-
- // Draw text and set the new x position
- //lyxerr << "paint row: yo_ " << yo_ << "\n";
-#if 0
- int width = pain_.text(int(x_), yo_, str, font);
-#else
- int width = pain_.text(int(x_), yo_, &str[0], str.size(), font);
-#endif
- x_ += width;
+ if (prev_change != Change::UNCHANGED) {
+ LyXFont copy(font);
+ if (prev_change == Change::DELETED) {
+ copy.setColor(LColor::strikeout);
+ } else if (prev_change == Change::INSERTED) {
+ copy.setColor(LColor::newtext);
+ }
+ x_ += pain_.text(int(x_), yo_, &str[0], str.size(), copy);
+ } else {
+ x_ += pain_.text(int(x_), yo_, &str[0], str.size(), font);
+ }