]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathCancel.cpp
Get rid of Inset::setPosCache
[lyx.git] / src / mathed / InsetMathCancel.cpp
index f4618f259c10564a5e398fb9a5add8706b3fdbc2..0e91575d8df2d3f58f38a8d1e82a0a38f8d5488b 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Uwe Stöhr
+ * \author Uwe Stöhr
  *
  * Full author contact details are available in file CREDITS.
  */
 
 #include "InsetMathCancel.h"
 
-#include "LaTeXFeatures.h"
 #include "MathStream.h"
 
+#include "LaTeXFeatures.h"
+#include "MetricsInfo.h"
+
 #include "frontends/Painter.h"
 
 #include <ostream>
@@ -35,13 +37,15 @@ Inset * InsetMathCancel::clone() const
 
 void InsetMathCancel::metrics(MetricsInfo & mi, Dimension & dim) const
 {
+       Changer dummy = mi.base.changeEnsureMath();
        cell(0).metrics(mi, dim);
-       metricsMarkers(dim);
+       metricsMarkers(mi, dim);
 }
 
 
 void InsetMathCancel::draw(PainterInfo & pi, int x, int y) const
 {
+       Changer dummy = pi.base.changeEnsureMath();
        // We first draw the text and then an arrow
        ColorCode const origcol = pi.base.font.color();
        cell(0).draw(pi, x + 1, y);