X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathSpace.cpp;h=39f3147bf1b3603864260e802beced96fcc2f29d;hb=d85cf3218a14f5b7419dbc6b6796e65ff5dbfc74;hp=e6aa834ea839c4f6ff4792cb67ea728075ec3426;hpb=348e0241af2dd8e5e1dda30e28d89c3a7f1fc03b;p=lyx.git diff --git a/src/mathed/InsetMathSpace.cpp b/src/mathed/InsetMathSpace.cpp index e6aa834ea8..39f3147bf1 100644 --- a/src/mathed/InsetMathSpace.cpp +++ b/src/mathed/InsetMathSpace.cpp @@ -121,6 +121,7 @@ Inset * InsetMathSpace::clone() const void InsetMathSpace::metrics(MetricsInfo & mi, Dimension & dim) const { + Changer dummy = mi.base.changeEnsureMath(); dim.asc = 4; dim.des = 0; if (space_info[space_].custom) @@ -132,6 +133,7 @@ void InsetMathSpace::metrics(MetricsInfo & mi, Dimension & dim) const void InsetMathSpace::draw(PainterInfo & pi, int x, int y) const { + Changer dummy = pi.base.changeEnsureMath(); // Sadly, HP-UX CC can't handle that kind of initialization. // XPoint p[4] = {{++x, y-3}, {x, y}, {x+width-2, y}, {x+width-2, y-3}}; if (!space_info[space_].visible) @@ -266,7 +268,9 @@ void InsetMathSpace::normalize(NormalStream & os) const void InsetMathSpace::write(WriteStream & os) const { - // no MathEnsurer - all kinds work in text and math mode + // All kinds work in text and math mode, so simply suspend + // writing a possibly pending mode closing brace. + MathEnsurer ensurer(os, false); if (space_info[space_].escape) os << '\\'; os << space_info[space_].name.c_str();