X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathDiagram.cpp;h=c2019d4be856930273f5d456822a6ca327bfec07;hb=02e82157ec583c3900e359de86be79fac6512387;hp=18d7c6085172f0fbca84d3d13dd834dd7ede6571;hpb=a9eb87a89d2ba1a492f2a01fc92e360e056bf2d6;p=lyx.git diff --git a/src/mathed/InsetMathDiagram.cpp b/src/mathed/InsetMathDiagram.cpp index 18d7c60851..c2019d4be8 100644 --- a/src/mathed/InsetMathDiagram.cpp +++ b/src/mathed/InsetMathDiagram.cpp @@ -48,17 +48,20 @@ 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.changeStyle(LM_ST_TEXT, f.style() == LM_ST_DISPLAY); + Changer dummy = (f.style() == LM_ST_DISPLAY) ? f.changeStyle(LM_ST_TEXT) + : Changer(); 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.changeStyle(LM_ST_TEXT, f.style() == LM_ST_DISPLAY); + Changer dummy = (f.style() == LM_ST_DISPLAY) ? f.changeStyle(LM_ST_TEXT) + : Changer(); InsetMathGrid::draw(pi, x, y); }