Fix assertion: label copy-paste-as-ref in new par

Because the reference got inserted without specifying a font,
Paragraph::fontSpan fired an assertion because the fontlist_ is empty.
This commit is contained in:
Vincent van Ravesteijn 2013-05-19 12:28:11 +02:00
parent 2d8941eec3
commit d9da8dc2c1

View File

@ -901,7 +901,8 @@ void copyInset(Cursor const & cur, Inset * inset, docstring const & plaintext)
Paragraph par;
BufferParams const & bp = cur.buffer()->params();
par.setLayout(bp.documentClass().plainLayout());
par.insertInset(0, inset, Change(Change::UNCHANGED));
Font font(inherit_font, bp.language);
par.insertInset(0, inset, font, Change(Change::UNCHANGED));
pars.push_back(par);
theCuts.push(make_pair(pars, bp.documentClassPtr()));