X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathDecoration.cpp;h=908a887eebb5bbea01d8a944d3885293b42a2acc;hb=9296344b9a26191a2092d175a51e357ecc35145d;hp=f7fd6ea2aa20300162d2e8da059131322b378705;hpb=02e82157ec583c3900e359de86be79fac6512387;p=lyx.git diff --git a/src/mathed/InsetMathDecoration.cpp b/src/mathed/InsetMathDecoration.cpp index f7fd6ea2aa..908a887eeb 100644 --- a/src/mathed/InsetMathDecoration.cpp +++ b/src/mathed/InsetMathDecoration.cpp @@ -105,10 +105,7 @@ InsetMath::mode_type InsetMathDecoration::currentMode() const void InsetMathDecoration::metrics(MetricsInfo & mi, Dimension & dim) const { - Changer dummy = - (currentMode() == MATH_MODE) ? mi.base.changeEnsureMath() : - (isMathFont(mi.base.fontname)) ? mi.base.changeFontSet("textnormal") - : Changer(); + Changer dummy = mi.base.changeEnsureMath(currentMode()); cell(0).metrics(mi, dim); @@ -122,26 +119,20 @@ void InsetMathDecoration::metrics(MetricsInfo & mi, Dimension & dim) const dy_ = dim.des + 1; dim.des += dh_ + 2; } - - metricsMarkers(mi, dim); } void InsetMathDecoration::draw(PainterInfo & pi, int x, int y) const { - Changer dummy = - (currentMode() == MATH_MODE) ? pi.base.changeEnsureMath() : - (isMathFont(pi.base.fontname)) ? pi.base.changeFontSet("textnormal") - : Changer(); + Changer dummy = pi.base.changeEnsureMath(currentMode()); - cell(0).draw(pi, x + 1, y); + cell(0).draw(pi, x, y); Dimension const & dim0 = cell(0).dimension(*pi.base.bv); if (wide()) mathed_draw_deco(pi, x + 1, y + dy_, dim0.wid, dh_, key_->name); else mathed_draw_deco(pi, x + 1 + (dim0.wid - dw_) / 2, y + dy_, dw_, dh_, key_->name); - drawMarkers(pi, x, y); } @@ -218,7 +209,7 @@ namespace { buildTranslationMap(t); return t; } -} +} // namespace void InsetMathDecoration::mathmlize(MathStream & os) const {