]> git.lyx.org Git - features.git/commitdiff
Move code to InsetMathHull::updateMacros.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 12 Nov 2020 22:43:57 +0000 (17:43 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 12 Nov 2020 23:09:56 +0000 (18:09 -0500)
src/insets/InsetText.cpp
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathHull.h

index e8deb3a60cd2f1354a80a44835267593f639c9f2..9d8b2ac0063a487bdd38f8b5dd47c864915f1898 100644 (file)
@@ -962,7 +962,7 @@ void InsetText::updateMacros(DocIterator const & us, DocIterator const & scope)
                        if (im)  {
                                InsetMathHull * hull = im->asHullInset();
                                if (hull)
-                                       hull->recordLocation(it);
+                                       hull->updateMacros(it, ourscope);
                        }
 
                        if (insit.inset->lyxCode() != MATHMACRO_CODE)
index 43f49584afcc236866c5540356343576420b3085..5464115e88b89e0f90226e6fcb056ac97439793c 100644 (file)
@@ -238,6 +238,13 @@ namespace {
 } // namespace
 
 
+// FIXME This may or may not be the right place to do this.
+void InsetMathHull::updateMacros(DocIterator const & us, DocIterator const &)
+{
+       recordLocation(us);
+}
+
+
 void InsetMathHull::updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted)
 {
        if (!buffer_) {
index 0b085a11f948d5f934b3d91ca404f1a1040f068c..ef77a75b30ff4fe35c9a4b152a0648f0303928cd 100644 (file)
@@ -50,6 +50,8 @@ public:
        void setBuffer(Buffer &) override;
        ///
        void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
+       /// This must be called by any subclass that overrides it!
+       void updateMacros(DocIterator const & us, DocIterator const & scope) override;
        ///
        void addToToc(DocIterator const & di, bool output_active,
                                  UpdateType utype, TocBackend & backend) const override;