]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathCancelto.cpp
Get rid of Inset::setPosCache
[lyx.git] / src / mathed / InsetMathCancelto.cpp
index d6d2233dd25488111b3ffe5d866e79d850661266..283a97157d7d9c66033523fae6778d8032d7e026 100644 (file)
 
 #include "InsetMathCancelto.h"
 
-#include "Cursor.h"
-#include "LaTeXFeatures.h"
 #include "MathData.h"
 #include "MathStream.h"
 
+#include "Cursor.h"
+#include "LaTeXFeatures.h"
+#include "MetricsInfo.h"
+
 #include "frontends/Painter.h"
 
 #include <ostream>
@@ -39,18 +41,20 @@ Inset * InsetMathCancelto::clone() const
 
 void InsetMathCancelto::metrics(MetricsInfo & mi, Dimension & dim) const
 {
+       Changer dummy = mi.base.changeEnsureMath();
        InsetMathNest::metrics(mi);
        Dimension const & dim0 = cell(0).dimension(*mi.base.bv);
        Dimension const & dim1 = cell(1).dimension(*mi.base.bv);
        dim.asc = max(dim0.ascent() + 2, dim0.ascent() + dim1.ascent()) + 2 + 8;
        dim.des = max(dim0.descent() - 2, dim1.descent()) + 2;
        dim.wid = dim0.width() + dim1.width() + 10;
-       metricsMarkers(dim);
+       metricsMarkers(mi, dim);
 }
 
 
 void InsetMathCancelto::draw(PainterInfo & pi, int x, int y) const
 {
+       Changer dummy = pi.base.changeEnsureMath();
        ColorCode const origcol = pi.base.font.color();
 
        // We first draw the text and then an arrow