X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathSpace.cpp;h=c84bc771d82251124497a0c325a7e35abc1d4cfe;hb=89342f2946abd5d01b019a729d1f160b0c9d3d50;hp=6d873b3460d3d7148b34adefe37e35185a25068c;hpb=7287a259c5436b8f3f384c0d0bd7641a2f2601e9;p=lyx.git diff --git a/src/mathed/InsetMathSpace.cpp b/src/mathed/InsetMathSpace.cpp index 6d873b3460..c84bc771d8 100644 --- a/src/mathed/InsetMathSpace.cpp +++ b/src/mathed/InsetMathSpace.cpp @@ -123,9 +123,7 @@ void InsetMathSpace::metrics(MetricsInfo & mi, Dimension & dim) const dim.asc = 4; dim.des = 0; if (space_info[space_].custom) - dim.wid = abs(length_.inPixels( - mi.base.textwidth, - mathed_char_width(mi.base.font, 'M'))); + dim.wid = abs(length_.inPixels(mi.base)); else dim.wid = space_info[space_].width; } @@ -273,15 +271,15 @@ void InsetMathSpace::write(WriteStream & os) const os << space_info[space_].name.c_str(); if (space_info[space_].custom) os << '{' << length_.asLatexString().c_str() << '}'; - else if (space_info[space_].escape && space_info[space_].name != " ") + else if (space_info[space_].escape && space_info[space_].name.length() > 1) os.pendingSpace(true); } InsetSpaceParams InsetMathSpace::params() const { - LASSERT(space_info[space_].visible, /**/); InsetSpaceParams isp(true); + LASSERT(space_info[space_].visible, return isp); isp.kind = space_info[space_].kind; isp.length = GlueLength(length_); return isp;