]> git.lyx.org Git - lyx.git/blobdiff - src/RowPainter.cpp
Cleanup Painter text() API
[lyx.git] / src / RowPainter.cpp
index 276664237f220572c99621abcd84d80148d4a226..e6c6353307d978f470beb4873f2b5277cdabd13d 100644 (file)
@@ -246,13 +246,14 @@ void RowPainter::paintStringAndSel(Row::Element const & e)
                Color const col = e.change.changed() ? e.change.color()
                                                     : Color_selectiontext;
                copy.fontInfo().setPaintColor(col);
-               pi_.pain.text(int(x_), yo_, e.str, copy, e.extra);
+               pi_.pain.text(int(x_), yo_, e.str, copy, e.extra, e.full_width());
        } else if (!some_sel) {
-               pi_.pain.text(int(x_), yo_, e.str, e.font, e.extra);
+               pi_.pain.text(int(x_), yo_, e.str, e.font, e.extra, e.full_width());
        } else {
                pi_.pain.text(int(x_), yo_, e.str, e.font, Color_selectiontext,
-                                   max(row_.sel_beg, e.pos) - e.pos,
-                        min(row_.sel_end, e.endpos) - e.pos, e.extra);
+                             max(row_.sel_beg, e.pos) - e.pos,
+                             min(row_.sel_end, e.endpos) - e.pos,
+                             e.extra, e.full_width());
        }
        x_ += e.full_width();
 }
@@ -577,7 +578,6 @@ void RowPainter::paintOnlyInsets()
                Row::Element const & e = *cit;
                if (e.type == Row::INSET) {
                        // If outer row has changed, nested insets are repainted completely.
-                       pi_.base.bv->coordCache().insets().add(e.inset, int(x_), yo_);
                        bool const nested_inset =
                                (e.inset->asInsetMath() && !e.inset->asInsetMath()->asMacroTemplate())
                                || e.inset->asInsetText() || e.inset->asInsetTabular();
@@ -611,8 +611,7 @@ void RowPainter::paintText()
                                paintMisspelledMark(orig_x, e);
                        break;
                case Row::INSET: {
-                       // If outer row has changed, nested insets are repaint completely.
-                       pi_.base.bv->coordCache().insets().add(e.inset, int(x_), yo_);
+                       // If outer row has changed, nested insets are repainted completely.
                        paintInset(e);
                        foreign_descent = e.dim.descent();
                }