From 2d8941eec3e6787fafb743f2e9da5e94b33e39c1 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sat, 18 May 2013 17:06:15 +0200 Subject: [PATCH] Revert "Fix assertion for InsetInfos of icon types" Using "Font no_font" in case no font was supplied was wrong. Instantiating a font object without specifying the language lead to a font object having the default_language that is hardcoded to "english". See Language::read(). This caused that there were spurious language changes in the LaTeX output and made some document uncompilable. This reverts commit 361995459068a5e53b597f1195f7f29522714ec4. --- src/Paragraph.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 72a2600632..c1e208f84f 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -767,7 +767,7 @@ void Paragraph::Private::insertChar(pos_type pos, char_type c, bool Paragraph::insertInset(pos_type pos, Inset * inset, - Font const & font, Change const & change) + Change const & change) { LASSERT(inset, return false); LASSERT(pos >= 0 && pos <= size(), return false); @@ -785,8 +785,6 @@ bool Paragraph::insertInset(pos_type pos, Inset * inset, // Some insets require run of spell checker requestSpellCheck(pos); - - setFont(pos, font); return true; } @@ -1785,10 +1783,12 @@ void Paragraph::insertChar(pos_type pos, char_type c, bool Paragraph::insertInset(pos_type pos, Inset * inset, - Change const & change) + Font const & font, Change const & change) { - Font no_font; - return insertInset(pos, inset, no_font, change); + bool const success = insertInset(pos, inset, change); + // Set the font/language of the inset... + setFont(pos, font); + return success; } -- 2.39.2