X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathBig.cpp;h=117127e882ba2c303dfaa453d0b1e72dd3e2bef5;hb=12314897982e07afd8926c997f66d7bb08e7e1fd;hp=a5a0295fbfc3402ea47d195a4c0ae10eaea29a60;hpb=237c132c1e6fc720b87f2fea6deb18a8395cbe0a;p=lyx.git diff --git a/src/mathed/InsetMathBig.cpp b/src/mathed/InsetMathBig.cpp index a5a0295fbf..117127e882 100644 --- a/src/mathed/InsetMathBig.cpp +++ b/src/mathed/InsetMathBig.cpp @@ -67,19 +67,21 @@ void InsetMathBig::metrics(MetricsInfo & mi, Dimension & dim) const dim.wid = 6; dim.asc = int(h + f * h); dim.des = int(f * h); - dim_ = dim; + // Cache the inset dimension. + setDimCache(mi, dim); } void InsetMathBig::draw(PainterInfo & pi, int x, int y) const { + Dimension const dim = dimension(*pi.base.bv); // mathed_draw_deco does not use the leading backslash, so remove it // (but don't use ltrim if this is the backslash delimiter). // Replace \| by \Vert (equivalent in LaTeX), since mathed_draw_deco // would treat it as |. docstring const delim = (delim_ == "\\|") ? from_ascii("Vert") : (delim_ == "\\\\") ? from_ascii("\\") : support::ltrim(delim_, "\\"); - mathed_draw_deco(pi, x + 1, y - dim_.ascent(), 4, dim_.height(), + mathed_draw_deco(pi, x + 1, y - dim.ascent(), 4, dim.height(), delim); setPosCache(pi, x, y); }