From d9da8dc2c1b0a902996a6cc2edf703fe043c6fe1 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sun, 19 May 2013 12:28:11 +0200 Subject: [PATCH] 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. --- src/CutAndPaste.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 1f46330087..ce6164d4ad 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -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()));