X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathCancelto.cpp;h=283a97157d7d9c66033523fae6778d8032d7e026;hb=2de30c62f8d671a8c8d4d52a6a7310e2c5ca84de;hp=d6d2233dd25488111b3ffe5d866e79d850661266;hpb=400703aff1984aa304a71e1ba315e1047d344020;p=lyx.git diff --git a/src/mathed/InsetMathCancelto.cpp b/src/mathed/InsetMathCancelto.cpp index d6d2233dd2..283a97157d 100644 --- a/src/mathed/InsetMathCancelto.cpp +++ b/src/mathed/InsetMathCancelto.cpp @@ -12,11 +12,13 @@ #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 @@ -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