- if (inset) {
- if (inset->editable()==Inset::IS_EDITABLE) {
- UpdatableInset * uinset =
- static_cast<UpdatableInset *>(inset);
- uinset->setFont(bv, fnt, toggleall, true);
- }
- }
- }
-
- LyXLayout const & layout =
- textclasslist.Style(buf->params.textclass,
- par->getLayout());
-
- // Get concrete layout font to reduce against
- LyXFont layoutfont;
-
- if (pos < beginningOfMainBody(buf, par))
- layoutfont = layout.labelfont;
- else
- layoutfont = layout.font;
-
- // Realize against environment font information
- if (par->getDepth()){
- Paragraph * tp = par;
- while (!layoutfont.resolved() && tp && tp->getDepth()) {
- tp = tp->outerHook();
- if (tp)
-#ifndef INHERIT_LANGUAGE
- layoutfont.realize(textclasslist.
- Style(buf->params.textclass,
- tp->getLayout()).font);
-#else
- layoutfont.realize(textclasslist.
- Style(buf->params.textclass,
- tp->getLayout()).font,
- buf->params.language);
-#endif
+ if (isEditableInset(inset)) {
+ UpdatableInset * uinset =
+ static_cast<UpdatableInset *>(inset);
+ uinset->setFont(bv, fnt, toggleall, true);