X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathAMSArray.cpp;h=9a9a3495bc7434392afc1e41aa5e6d2c5519106c;hb=5fdc577badb1cb133d6a0dc7d831bb1f82576adb;hp=426362dfd7ee6d2d4718cd96f277400b7f51928a;hpb=e2bc7ffae3eb387661064be8b9dc927742f9e7e8;p=lyx.git diff --git a/src/mathed/InsetMathAMSArray.cpp b/src/mathed/InsetMathAMSArray.cpp index 426362dfd7..9a9a3495bc 100644 --- a/src/mathed/InsetMathAMSArray.cpp +++ b/src/mathed/InsetMathAMSArray.cpp @@ -85,23 +85,22 @@ char const * InsetMathAMSArray::name_right() const void InsetMathAMSArray::metrics(MetricsInfo & mi, Dimension & dim) const { - Changer dummy = - mi.base.changeStyle(LM_ST_TEXT, mi.base.style == LM_ST_DISPLAY); + Changer dummy2 = mi.base.changeEnsureMath(); + Changer dummy = mi.base.changeArray(); InsetMathGrid::metrics(mi, dim); - dim.wid += 14; } void InsetMathAMSArray::draw(PainterInfo & pi, int x, int y) const { + Changer dummy2 = pi.base.changeEnsureMath(); Dimension const dim = dimension(*pi.base.bv); int const yy = y - dim.ascent(); // Drawing the deco after changeStyle does not work mathed_draw_deco(pi, x + 1, yy, 5, dim.height(), from_ascii(name_left())); mathed_draw_deco(pi, x + dim.width() - 8, yy, 5, dim.height(), from_ascii(name_right())); - Changer dummy = - pi.base.changeStyle(LM_ST_TEXT, pi.base.style == LM_ST_DISPLAY); - InsetMathGrid::drawWithMargin(pi, x, y, 6, 8); + Changer dummy = pi.base.changeArray(); + InsetMathGrid::draw(pi, x, y); }