case Inset::AlignCenter:
align = LYX_ALIGN_CENTER;
break;
- // other types unchanged (use align)
- }
+ case Inset::Inline:
+ case Inset::AlignRight:
+ // unchanged (use align)
+ break;
+ }
}
switch (align) {
par.highestFontInRange(row.pos(), pos_end, size);
if (maxsize > font.size()) {
// use standard paragraph font with the maximal size
- font.setSize(maxsize);
- FontMetrics const & maxfontmetrics = theFontMetrics(font);
+ Font maxfont = font;
+ maxfont.setSize(maxsize);
+ FontMetrics const & maxfontmetrics = theFontMetrics(maxfont);
maxasc = max(maxasc, maxfontmetrics.maxAscent());
maxdesc = max(maxdesc, maxfontmetrics.maxDescent());
}