]> 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 6b12949b9ee9dbf0001f0506781bcf40aecbfdf4..4a7ea3c3b822d9221b6f0629bcdfff6229d2dcec 100644 (file)
@@ -50,7 +50,7 @@ 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);
 }
@@ -58,10 +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);
 }