]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDiagram.cpp
Only set buffer if it is not null.
[lyx.git] / src / mathed / InsetMathDiagram.cpp
index 6b12949b9ee9dbf0001f0506781bcf40aecbfdf4..baa20a5fa7cfef8ab5c2dba9d37ff48788bc450c 100644 (file)
@@ -50,19 +50,18 @@ 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();
+       Changer dummy = (f.style() == DISPLAY_STYLE) ? f.changeStyle(TEXT_STYLE)
+               : noChange();
        InsetMathGrid::metrics(mi, dim);
 }
 
 
 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();
+       Changer dummy = (f.style() == DISPLAY_STYLE) ? f.changeStyle(TEXT_STYLE)
+               : noChange();
        InsetMathGrid::draw(pi, x, y);
 }