From: Richard Kimberly Heck Date: Thu, 12 Nov 2020 22:43:57 +0000 (-0500) Subject: Move code to InsetMathHull::updateMacros. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7bab06289480eb33a7fa411ef4b3add4ac97e058;p=features.git Move code to InsetMathHull::updateMacros. --- diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index e8deb3a60c..9d8b2ac006 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -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) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 43f49584af..5464115e88 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -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_) { diff --git a/src/mathed/InsetMathHull.h b/src/mathed/InsetMathHull.h index 0b085a11f9..ef77a75b30 100644 --- a/src/mathed/InsetMathHull.h +++ b/src/mathed/InsetMathHull.h @@ -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;