mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-14 04:21:56 +00:00
Fix assertion: icon in insetinfo without a font
InsetInfos of the type ICON have a graphics Inset in their paragraph. These insets were inserted without a font. This lead to an assertion in Paragraph::fontSpan because the fontlist_ of the paragraph is empty.
This commit is contained in:
parent
cd802e5cf6
commit
8a40336848
@ -381,7 +381,7 @@ void InsetInfo::updateInfo()
|
|||||||
// do not insert > for the top level menu item
|
// do not insert > for the top level menu item
|
||||||
if (it != beg)
|
if (it != beg)
|
||||||
par.insertInset(par.size(), new InsetSpecialChar(InsetSpecialChar::MENU_SEPARATOR),
|
par.insertInset(par.size(), new InsetSpecialChar(InsetSpecialChar::MENU_SEPARATOR),
|
||||||
Change(Change::UNCHANGED));
|
f, Change(Change::UNCHANGED));
|
||||||
//FIXME: add proper underlines here. This
|
//FIXME: add proper underlines here. This
|
||||||
// involves rewriting searchMenu used above to
|
// involves rewriting searchMenu used above to
|
||||||
// return a vector of menus. If we do not do
|
// return a vector of menus. If we do not do
|
||||||
@ -412,7 +412,8 @@ void InsetInfo::updateInfo()
|
|||||||
igp.filename = file;
|
igp.filename = file;
|
||||||
inset->setParams(igp);
|
inset->setParams(igp);
|
||||||
clear();
|
clear();
|
||||||
paragraphs().front().insertInset(0, inset,
|
Font const f(inherit_font, buffer().params().language);
|
||||||
|
paragraphs().front().insertInset(0, inset, f,
|
||||||
Change(Change::UNCHANGED));
|
Change(Change::UNCHANGED));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user