]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathCancelto.cpp
Remove hardcoded values
[lyx.git] / src / mathed / InsetMathCancelto.cpp
index 6a04cfa246fd4f13b1b91ce4c0be7f82a074b213..283a97157d7d9c66033523fae6778d8032d7e026 100644 (file)
@@ -41,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