X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathLefteqn.cpp;h=358ecd3f0c2030cb5cafe8321625ea6b443639c9;hb=58ab972f714309aa87e7d956ceda00e18337875f;hp=4122d781f9afa264bcaee522d23dcf4cdb95eb99;hpb=f497296c30e6da2f97b16da8ad1c9e96feffb16b;p=lyx.git diff --git a/src/mathed/InsetMathLefteqn.cpp b/src/mathed/InsetMathLefteqn.cpp index 4122d781f9..358ecd3f0c 100644 --- a/src/mathed/InsetMathLefteqn.cpp +++ b/src/mathed/InsetMathLefteqn.cpp @@ -17,33 +17,26 @@ namespace lyx { - -using std::string; -using std::auto_ptr; - - InsetMathLefteqn::InsetMathLefteqn() : InsetMathNest(1) {} -auto_ptr InsetMathLefteqn::doClone() const +Inset * InsetMathLefteqn::clone() const { - return auto_ptr(new InsetMathLefteqn(*this)); + return new InsetMathLefteqn(*this); } -bool InsetMathLefteqn::metrics(MetricsInfo & mi, Dimension & dim) const +void InsetMathLefteqn::metrics(MetricsInfo & mi, Dimension & dim) const { cell(0).metrics(mi, dim); dim.asc += 2; dim.des += 2; dim.wid = 4; metricsMarkers(dim); - if (dim_ == dim) - return false; - dim_ = dim; - return true; + // Cache the inset dimension. + setDimCache(mi, dim); }