]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
Streamlining CollapseStatus stuff
[lyx.git] / src / TextMetrics.cpp
index d3d7bae61c6563338e86a1079468792885ebe246..fec9111b685c531501e57f1be89df110a5f21c20 100644 (file)
@@ -339,8 +339,11 @@ RowMetrics TextMetrics::computeRowMetrics(pit_type const pit,
                        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) {
@@ -664,8 +667,9 @@ void TextMetrics::setHeightOfRow(pit_type const pit,
                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());
        }