]> git.lyx.org Git - features.git/commitdiff
Fix bug #10951.
authorRichard Heck <rgheck@lyx.org>
Tue, 2 Jan 2018 03:18:52 +0000 (22:18 -0500)
committerRichard Heck <rgheck@lyx.org>
Thu, 4 Jan 2018 20:12:16 +0000 (15:12 -0500)
The Buffer member for the remembered definition_ was not being set.

src/mathed/InsetMathMacro.cpp
src/mathed/InsetMathMacro.h
src/mathed/MathData.h

index 3abd751d9c2b73e29f8c823f100680dd0f395fe1..3a8ec4de0acd8ddda52d837a8db8c58de56f747e 100644 (file)
@@ -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
index 7880aa01aac570a6c621503668aa0d5c11de19e5..80340df6f761f26db52c7b9b77796676e5635d09 100644 (file)
@@ -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;
index f8c35ccab31097187458a66b25db98d34ba2b93d..70c001975e9614a32f54c84ab6da621398cda9a7 100644 (file)
@@ -176,6 +176,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