- int const yy = y - dim_.ascent();
- // Drawing the deco after an ArrayChanger 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()));
- ArrayChanger dummy(pi.base);
- InsetMathGrid::drawWithMargin(pi, x, y, 6, 8);
+ 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.changeArray();
+ InsetMathGrid::draw(pi, x, y);