X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathEnv.cpp;h=a7fb33c69d408ac0e7aa704b879dd3d19698f5dd;hb=55a3dd7b346d29a52ba305a4558e9e380ef50f47;hp=adbca074e8245648894925f27765ef57c58e4e4e;hpb=688c186614a50a82b97733cb401e046ea8207352;p=lyx.git diff --git a/src/mathed/InsetMathEnv.cpp b/src/mathed/InsetMathEnv.cpp index adbca074e8..a7fb33c69d 100644 --- a/src/mathed/InsetMathEnv.cpp +++ b/src/mathed/InsetMathEnv.cpp @@ -3,7 +3,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author André Pönitz + * \author André Pönitz * * Full author contact details are available in file CREDITS. */ @@ -21,8 +21,8 @@ namespace lyx { -InsetMathEnv::InsetMathEnv(docstring const & name) - : InsetMathNest(1), name_(name) +InsetMathEnv::InsetMathEnv(Buffer * buf, docstring const & name) + : InsetMathNest(buf, 1), name_(name) {} @@ -36,8 +36,6 @@ void InsetMathEnv::metrics(MetricsInfo & mi, Dimension & dim) const { cell(0).metrics(mi, dim); metricsMarkers(dim); - // Cache the inset dimension. - setDimCache(mi, dim); } @@ -50,6 +48,7 @@ void InsetMathEnv::draw(PainterInfo & pi, int x, int y) const void InsetMathEnv::write(WriteStream & os) const { + MathEnsurer ensurer(os); os << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}'; }