X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathLefteqn.cpp;h=358ecd3f0c2030cb5cafe8321625ea6b443639c9;hb=58ab972f714309aa87e7d956ceda00e18337875f;hp=3c3dc4d572b1509852a950bfa24df87542029a92;hpb=32871c1284f15265f652ff01c438e539a7c8181f;p=lyx.git diff --git a/src/mathed/InsetMathLefteqn.cpp b/src/mathed/InsetMathLefteqn.cpp index 3c3dc4d572..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); }