- if (dit.pos() != dit.lastpos()) {
- pit_type const pit = dit.pit();
- pos_type const pos = dit.pos();
- if (pars_[pit].isInset(pos) &&
- pars_[pit].getInset(pos)->noFontChange())
- // We need to propagate the font change to all
- // text cells of the inset (bug 1973).
- // FIXME: This should change, see documentation
- // of noFontChange in Inset.h
- setInsetFont(bv, pit, pos, font, toggleall);
- TextMetrics const & tm = bv.textMetrics(this);
- Font f = tm.getDisplayFont(pit, pos);
- f.update(font, language, toggleall);
- setCharFont(buffer, pit, pos, f, tm.font_);
+ if (dit.pos() == dit.lastpos())
+ continue;
+ pit_type const pit = dit.pit();
+ pos_type const pos = dit.pos();
+ Inset * inset = pars_[pit].getInset(pos);
+ if (inset && inset->noFontChange()) {
+ // We need to propagate the font change to all
+ // text cells of the inset (bug 1973).
+ // FIXME: This should change, see documentation
+ // of noFontChange in Inset.h
+ setInsetFont(bv, pit, pos, font, toggleall);