]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDiagram.cpp
Assure correct spacing of colored items in mathed
[lyx.git] / src / mathed / InsetMathDiagram.cpp
index 9031b40d5e72c9a35c26e70a87756e2a5a0bc4ad..4a7ea3c3b822d9221b6f0629bcdfff6229d2dcec 100644 (file)
@@ -48,8 +48,9 @@ int InsetMathDiagram::rowsep() const
 
 void InsetMathDiagram::metrics(MetricsInfo & mi, Dimension & dim) const
 {
+       Changer dummy2 = mi.base.changeEnsureMath();
        FontInfo & f = mi.base.font;
-       Changer dummy = (f.style() == LM_ST_DISPLAY) ? f.changeStyle(LM_ST_TEXT)
+       Changer dummy = (f.style() == DISPLAY_STYLE) ? f.changeStyle(TEXT_STYLE)
                : Changer();
        InsetMathGrid::metrics(mi, dim);
 }
@@ -57,9 +58,9 @@ void InsetMathDiagram::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathDiagram::draw(PainterInfo & pi, int x, int y) const
 {
-       setPosCache(pi, x, y);
+       Changer dummy2 = pi.base.changeEnsureMath();
        FontInfo & f = pi.base.font;
-       Changer dummy = (f.style() == LM_ST_DISPLAY) ? f.changeStyle(LM_ST_TEXT)
+       Changer dummy = (f.style() == DISPLAY_STYLE) ? f.changeStyle(TEXT_STYLE)
                : Changer();
        InsetMathGrid::draw(pi, x, y);
 }