mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 22:17:41 +00:00
Fix assertion for InsetInfos of icon types
InsetInfo inserted insets in its text without specifying a font. This caused the fonlist to be incomplete and firing the assertion.
This commit is contained in:
parent
88eae06611
commit
3619954590
@ -767,7 +767,7 @@ void Paragraph::Private::insertChar(pos_type pos, char_type c,
|
||||
|
||||
|
||||
bool Paragraph::insertInset(pos_type pos, Inset * inset,
|
||||
Change const & change)
|
||||
Font const & font, Change const & change)
|
||||
{
|
||||
LASSERT(inset, return false);
|
||||
LASSERT(pos >= 0 && pos <= size(), return false);
|
||||
@ -785,6 +785,8 @@ bool Paragraph::insertInset(pos_type pos, Inset * inset,
|
||||
|
||||
// Some insets require run of spell checker
|
||||
requestSpellCheck(pos);
|
||||
|
||||
setFont(pos, font);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1783,12 +1785,10 @@ void Paragraph::insertChar(pos_type pos, char_type c,
|
||||
|
||||
|
||||
bool Paragraph::insertInset(pos_type pos, Inset * inset,
|
||||
Font const & font, Change const & change)
|
||||
Change const & change)
|
||||
{
|
||||
bool const success = insertInset(pos, inset, change);
|
||||
// Set the font/language of the inset...
|
||||
setFont(pos, font);
|
||||
return success;
|
||||
Font no_font;
|
||||
return insertInset(pos, inset, no_font, change);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user