X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathArray.cpp;h=eeea831d05e5c2d7f2279a88c6aa7a3553ba9c00;hb=2de30c62f8d671a8c8d4d52a6a7310e2c5ca84de;hp=22f8471bfe2fda2bf9289d3072d29b7fa605473a;hpb=e2bc7ffae3eb387661064be8b9dc927742f9e7e8;p=lyx.git diff --git a/src/mathed/InsetMathArray.cpp b/src/mathed/InsetMathArray.cpp index 22f8471bfe..eeea831d05 100644 --- a/src/mathed/InsetMathArray.cpp +++ b/src/mathed/InsetMathArray.cpp @@ -74,27 +74,17 @@ Inset * InsetMathArray::clone() const void InsetMathArray::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 += 6; -} - - -Dimension const InsetMathArray::dimension(BufferView const & bv) const -{ - Dimension dim = InsetMathGrid::dimension(bv); - dim.wid += 6; - return dim; } void InsetMathArray::draw(PainterInfo & pi, int x, int y) const { - setPosCache(pi, x, y); - Changer dummy = - pi.base.changeStyle(LM_ST_TEXT, pi.base.style == LM_ST_DISPLAY); - InsetMathGrid::drawWithMargin(pi, x, y, 4, 2); + Changer dummy2 = pi.base.changeEnsureMath(); + Changer dummy = pi.base.changeArray(); + InsetMathGrid::draw(pi, x, y); }