X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathComment.cpp;h=4648ba1f17bcf6795ffe71e1600e4dd33e776ac4;hb=12314897982e07afd8926c997f66d7bb08e7e1fd;hp=57d74a9499f748fee2b5f575c4b3bc2e779e663b;hpb=32871c1284f15265f652ff01c438e539a7c8181f;p=lyx.git diff --git a/src/mathed/InsetMathComment.cpp b/src/mathed/InsetMathComment.cpp index 57d74a9499..4648ba1f17 100644 --- a/src/mathed/InsetMathComment.cpp +++ b/src/mathed/InsetMathComment.cpp @@ -19,10 +19,6 @@ namespace lyx { -using std::string; -using std::auto_ptr; - - InsetMathComment::InsetMathComment() : InsetMathNest(1) {} @@ -36,20 +32,18 @@ InsetMathComment::InsetMathComment(docstring const & str) } -auto_ptr InsetMathComment::doClone() const +Inset * InsetMathComment::clone() const { - return auto_ptr(new InsetMathComment(*this)); + return new InsetMathComment(*this); } -bool InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const +void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const { cell(0).metrics(mi, dim); metricsMarkers(dim); - if (dim_ == dim) - return false; - dim_ = dim; - return true; + // Cache the inset dimension. + setDimCache(mi, dim); }