From: Richard Heck Date: Tue, 2 Jan 2018 03:18:52 +0000 (-0500) Subject: Fix bug #10951. X-Git-Tag: 2.3.0rc2~92 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b92ddb03627e266bdd6c5e9de30d0709c4f452fe;p=features.git Fix bug #10951. The Buffer member for the remembered definition_ was not being set. (cherry picked from commit f130f7713fae326daa05795a5bf4761d33aee649) --- diff --git a/src/mathed/InsetMathMacro.cpp b/src/mathed/InsetMathMacro.cpp index 3abd751d9c..3a8ec4de0a 100644 --- a/src/mathed/InsetMathMacro.cpp +++ b/src/mathed/InsetMathMacro.cpp @@ -1318,4 +1318,10 @@ void InsetMathMacro::completionPosAndDim(Cursor const & cur, int & x, int & y, } +void InsetMathMacro::setBuffer(Buffer & buffer) +{ + d->definition_.setBuffer(buffer); + InsetMathNest::setBuffer(buffer); +} + } // namespace lyx diff --git a/src/mathed/InsetMathMacro.h b/src/mathed/InsetMathMacro.h index 7880aa01aa..80340df6f7 100644 --- a/src/mathed/InsetMathMacro.h +++ b/src/mathed/InsetMathMacro.h @@ -149,6 +149,8 @@ public: /// This is not used for display; however whether it is mathrel determines /// how to split equations intelligently. MathClass mathClass() const; //override + /// Override so as to set Buffer for defnition_ member, too. + void setBuffer(Buffer &); protected: friend class MathData; diff --git a/src/mathed/MathData.h b/src/mathed/MathData.h index 2f6ab22acd..31bb787c98 100644 --- a/src/mathed/MathData.h +++ b/src/mathed/MathData.h @@ -178,6 +178,8 @@ public: void updateMacros(Cursor * cur, MacroContext const & mc, UpdateType, int nesting); /// void updateBuffer(ParIterator const &, UpdateType); + /// + void setBuffer(Buffer & b) { buffer_ = &b; } protected: /// cached values for super/subscript placement