}
text->insertInset(cur, inset);
+ InsetText * inset_text = inset->asInsetText();
+ if (inset_text) {
+ Font const & font = inset->inheritFont()
+ ? cur.bv().textMetrics(text).displayFont(cur.pit(), cur.pos())
+ : buffer.params().getFont();
+ inset_text->setOuterFont(cur.bv(), font.fontInfo());
+ }
+
if (edit)
inset->edit(cur, true);
cur.buffer()->errors("Paste");
cur.clearSelection(); // bug 393
cur.finishUndo();
- InsetText * inset_text = inset->asInsetText();
if (inset_text) {
inset_text->fixParagraphsFont();
cur.pos() = 0;
// inside it.
doInsertInset(cur, this, cmd, true, true);
cur.posForward();
- /* The font of the inset is computed in metrics(), and this is
- * used to compute the height of the caret (because the font
- * is stored in TextMetrics::font_). When we insert, we have
- * to make sure that metrics are computed so that the caret
- * height is correct. Arguably, this is hackish.*/
- bv->processUpdateFlags(Update::SinglePar);
cur.setCurrentFont();
// Some insets are numbered, others are shown in the outline pane so
// let's update the labels and the toc backend.