X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_amsarrayinset.C;h=32628d0df2876513abac3176083bf73f9003b92f;hb=e8ec07a066182276b4a03535777737982d619176;hp=96b8316d012f43e8195f963ca5b153cc55135fd5;hpb=5b448e549e030f6389d1f98f162cd042aef283bb;p=lyx.git diff --git a/src/mathed/math_amsarrayinset.C b/src/mathed/math_amsarrayinset.C index 96b8316d01..32628d0df2 100644 --- a/src/mathed/math_amsarrayinset.C +++ b/src/mathed/math_amsarrayinset.C @@ -80,10 +80,8 @@ char const * MathAMSArrayInset::name_right() const void MathAMSArrayInset::metrics(MetricsInfo & mi, Dimension & dim) const { - MetricsInfo m = mi; - if (m.base.style == LM_ST_DISPLAY) - m.base.style = LM_ST_TEXT; - MathGridInset::metrics(m, dim); + ArrayChanger dummy(mi.base); + MathGridInset::metrics(mi, dim); dim.wid += 14; dim_ = dim; } @@ -91,11 +89,12 @@ void MathAMSArrayInset::metrics(MetricsInfo & mi, Dimension & dim) const void MathAMSArrayInset::draw(PainterInfo & pi, int x, int y) const { - MathGridInset::drawWithMargin(pi, x, y, 6, 8); 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(), name_left()); mathed_draw_deco(pi, x + dim_.width() - 8, yy, 5, dim_.height(), name_right()); - setPosCache(pi, x, y); + ArrayChanger dummy(pi.base); + MathGridInset::drawWithMargin(pi, x, y, 6, 8); }