mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
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 3619954590
.
This commit is contained in:
parent
f8a5d7cc63
commit
2d8941eec3
@ -767,7 +767,7 @@ void Paragraph::Private::insertChar(pos_type pos, char_type c,
|
|||||||
|
|
||||||
|
|
||||||
bool Paragraph::insertInset(pos_type pos, Inset * inset,
|
bool Paragraph::insertInset(pos_type pos, Inset * inset,
|
||||||
Font const & font, Change const & change)
|
Change const & change)
|
||||||
{
|
{
|
||||||
LASSERT(inset, return false);
|
LASSERT(inset, return false);
|
||||||
LASSERT(pos >= 0 && pos <= size(), 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
|
// Some insets require run of spell checker
|
||||||
requestSpellCheck(pos);
|
requestSpellCheck(pos);
|
||||||
|
|
||||||
setFont(pos, font);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1785,10 +1783,12 @@ void Paragraph::insertChar(pos_type pos, char_type c,
|
|||||||
|
|
||||||
|
|
||||||
bool Paragraph::insertInset(pos_type pos, Inset * inset,
|
bool Paragraph::insertInset(pos_type pos, Inset * inset,
|
||||||
Change const & change)
|
Font const & font, Change const & change)
|
||||||
{
|
{
|
||||||
Font no_font;
|
bool const success = insertInset(pos, inset, change);
|
||||||
return insertInset(pos, inset, no_font, change);
|
// Set the font/language of the inset...
|
||||||
|
setFont(pos, font);
|
||||||
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user