]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathArray.cpp
Improve the list of equations
[lyx.git] / src / mathed / InsetMathArray.cpp
index 22f8471bfe2fda2bf9289d3072d29b7fa605473a..eeea831d05e5c2d7f2279a88c6aa7a3553ba9c00 100644 (file)
@@ -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);
 }