]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathAMSArray.cpp
Improve the list of equations
[lyx.git] / src / mathed / InsetMathAMSArray.cpp
index 13d7a9425e5244a77a2cb226d1b060fcb66fe7f0..9a9a3495bc7434392afc1e41aa5e6d2c5519106c 100644 (file)
@@ -20,8 +20,8 @@
 
 #include "FuncRequest.h"
 #include "FuncStatus.h"
-#include "support/gettext.h"
 
+#include "support/gettext.h"
 #include "support/lstrings.h"
 
 #include <sstream>
@@ -85,21 +85,22 @@ char const * InsetMathAMSArray::name_right() const
 
 void InsetMathAMSArray::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       ArrayChanger dummy(mi.base);
+       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 an ArrayChanger does not work
+       // 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()));
-       ArrayChanger dummy(pi.base);
-       InsetMathGrid::drawWithMargin(pi, x, y, 6, 8);
+       Changer dummy = pi.base.changeArray();
+       InsetMathGrid::draw(pi, x, y);
 }