The Buffer member for the remembered definition_ was not being set.

(cherry picked from commit f130f7713f)
This commit is contained in:
Richard Heck 2018-01-01 22:18:52 -05:00
parent d0506a912e
commit cc360b4899
3 changed files with 10 additions and 0 deletions

View File

@ -171,6 +171,8 @@ public:
void updateMacros(Cursor * cur, MacroContext const & mc, UpdateType); void updateMacros(Cursor * cur, MacroContext const & mc, UpdateType);
/// ///
void updateBuffer(ParIterator const &, UpdateType); void updateBuffer(ParIterator const &, UpdateType);
///
void setBuffer(Buffer & b) { buffer_ = &b; }
protected: protected:
/// cached values for super/subscript placement /// cached values for super/subscript placement

View File

@ -1180,4 +1180,10 @@ void MathMacro::completionPosAndDim(Cursor const & cur, int & x, int & y,
} }
void MathMacro::setBuffer(Buffer & buffer)
{
d->definition_.setBuffer(buffer);
InsetMathNest::setBuffer(buffer);
}
} // namespace lyx } // namespace lyx

View File

@ -129,6 +129,8 @@ public:
size_t appetite() const; size_t appetite() const;
/// ///
InsetCode lyxCode() const { return MATH_MACRO_CODE; } InsetCode lyxCode() const { return MATH_MACRO_CODE; }
/// Override so as to set Buffer for defnition_ member, too.
void setBuffer(Buffer &);
protected: protected:
friend class MathData; friend class MathData;