[LyX features/cleanup/updateMacros4] Remove now useless routine
Richard Kimberly Heck
rikiheck at lyx.org
Fri Nov 13 00:38:10 UTC 2020
The branch, cleanup/updateMacros4, has been updated.
discards c437264b4d7b001f550db5af2794cd4876c7ddb0 (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (c437264b4d7b001f550db5af2794cd4876c7ddb0)
\
N -- N -- N (7042457fa2a189c69e5d7e4f719dbd2169b81095)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
- Log -----------------------------------------------------------------
commit 7042457fa2a189c69e5d7e4f719dbd2169b81095
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date: Thu Nov 12 19:59:45 2020 -0500
Remove now useless routine
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index f4b513c..f0df3a1 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -172,9 +172,6 @@ public:
MacroData const * getBufferMacro(docstring const & name,
DocIterator const & pos) const;
- /// Update macro table starting with position of it \param it in some
- /// text inset.
- void updateMacros(DocIterator & it, DocIterator & scope);
///
void setLabel(ParIterator & it, UpdateType utype) const;
@@ -3758,12 +3755,6 @@ MacroData const * Buffer::getMacro(docstring const & name,
}
-void Buffer::Impl::updateMacros(DocIterator & it, DocIterator & scope)
-{
- owner_->inset().updateMacros(it, scope);
-}
-
-
void Buffer::setMacroLock() const
{
d->macro_lock = true;
@@ -3827,7 +3818,7 @@ void Buffer::updateMacros() const
DocIterator it = par_iterator_begin();
DocIterator outerScope = it;
outerScope.pit() = outerScope.lastpit() + 2;
- d->updateMacros(it, outerScope);
+ inset().updateMacros(it, outerScope);
}
commit 50f975f7db89dab2039aa3dd5373c55ba9d2c638
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date: Thu Nov 12 19:58:30 2020 -0500
Fix iterator in InsetInclude to be as it was previously.
diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
index eff6fb5..79ecaec 100644
--- a/src/insets/InsetInclude.cpp
+++ b/src/insets/InsetInclude.cpp
@@ -1405,8 +1405,15 @@ void InsetInclude::updateMacros(DocIterator const & us, DocIterator const & scop
buffer().setMacroLock();
loadIfNeeded();
buffer().clearMacroLock();
- if (child_buffer_)
- buffer().registerChild(child_buffer_, us, scope);
+ if (child_buffer_) {
+ // We want an iterator that just points at the location of this inset,
+ // whereas the one we were passed has us on top.
+ // At least, that is how the updateMacros code was before RKH modified
+ // it. That is not to say they quite understand why it was like that.
+ DocIterator it = us;
+ it.pop_back();
+ buffer().registerChild(child_buffer_, it, scope);
+ }
}
-----------------------------------------------------------------------
Summary of changes:
src/Buffer.cpp | 11 +----------
src/insets/InsetInclude.cpp | 2 +-
2 files changed, 2 insertions(+), 11 deletions(-)
hooks/post-receive
--
Repository for new features
More information about the lyx-cvs
mailing list