]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNote.cpp
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetNote.cpp
index babe2bf651b39c3887463f27b1f2eaafcf34bc7d..ab90288c6beb5530ad33f553567693c5c5bbf29d 100644 (file)
@@ -220,11 +220,13 @@ void InsetNote::updateLabels(Buffer const & buf, ParIterator const & it)
 }
 
 
-void InsetNote::addToToc(TocList & toclist, Buffer const & /*buf*/, ParConstIterator const &) const
+void InsetNote::addToToc(Buffer const & buf,
+       ParConstIterator const & cpit) const
 {
-       ParConstIterator pit = par_const_iterator_begin(*this);
+       ParConstIterator pit = cpit;
+       pit.push_back(*this);
 
-       Toc & toc = toclist["note"];
+       Toc & toc = buf.tocBackend().toc("note");
        docstring str;
        str = notetranslator_loc().find(params_.type) + from_ascii(": ")
                + getNewLabel(str);