]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDecoration.cpp
Simplify Changers interface
[lyx.git] / src / mathed / InsetMathDecoration.cpp
index acc49743fa3455843166ee86e3d78a0e5b36cc55..e152efe6b1f757f79ede087c165c0bfe8209e270 100644 (file)
@@ -107,7 +107,8 @@ void InsetMathDecoration::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        bool really_change_font = currentMode() == TEXT_MODE
                                && isMathFont(mi.base.fontname);
-       Changer dummy = mi.base.changeFontSet("textnormal", really_change_font);
+       Changer dummy = really_change_font ? mi.base.changeFontSet("textnormal")
+               : Changer();
 
        cell(0).metrics(mi, dim);
 
@@ -130,7 +131,8 @@ void InsetMathDecoration::draw(PainterInfo & pi, int x, int y) const
 {
        bool really_change_font = currentMode() == TEXT_MODE
                                      && isMathFont(pi.base.fontname);
-       Changer dummy = pi.base.changeFontSet("textnormal", really_change_font);
+       Changer dummy = really_change_font ? pi.base.changeFontSet("textnormal")
+               : Changer();
 
        cell(0).draw(pi, x + 1, y);
        Dimension const & dim0 = cell(0).dimension(*pi.base.bv);