]> git.lyx.org Git - features.git/commitdiff
* Font are lightweight, so better do not change the other font, but a copy
authorStefan Schimanski <sts@lyx.org>
Sun, 10 Jun 2007 15:34:00 +0000 (15:34 +0000)
committerStefan Schimanski <sts@lyx.org>
Sun, 10 Jun 2007 15:34:00 +0000 (15:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18733 a592a061-630c-0410-9148-cb99ea01b6c8

src/TextMetrics.cpp

index d3d7bae61c6563338e86a1079468792885ebe246..8467e45a189b2618719daf65d83ff134e2de1258 100644 (file)
@@ -664,8 +664,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());
        }