]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathBig.cpp
Get rid of Inset::setPosCache
[lyx.git] / src / mathed / InsetMathBig.cpp
index 9c2f3bff5b3f88ab7471bb1fde661fba115d248d..76efc571dbf853dcc03a56e10cc2568a1346a8da 100644 (file)
@@ -69,6 +69,7 @@ double InsetMathBig::increase() const
 
 void InsetMathBig::metrics(MetricsInfo & mi, Dimension & dim) const
 {
+       Changer dummy = mi.base.changeEnsureMath();
        double const h = theFontMetrics(mi.base.font).ascent('I');
        double const f = increase();
        dim.wid = 6;
@@ -79,6 +80,7 @@ void InsetMathBig::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathBig::draw(PainterInfo & pi, int x, int y) const
 {
+       Changer dummy = pi.base.changeEnsureMath();
        Dimension const dim = dimension(*pi.base.bv);
        // mathed_draw_deco does not use the leading backslash, so remove it
        // (but don't use ltrim if this is the backslash delimiter).
@@ -88,7 +90,6 @@ void InsetMathBig::draw(PainterInfo & pi, int x, int y) const
                (delim_ == "\\\\") ? from_ascii("\\") : support::ltrim(delim_, "\\");
        mathed_draw_deco(pi, x + 1, y - dim.ascent(), 4, dim.height(),
                         delim);
-       setPosCache(pi, x, y);
 }