]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetIndex.cpp
fix http://bugzilla.lyx.org/show_bug.cgi?id=4998
[lyx.git] / src / insets / InsetIndex.cpp
index c6a008c5f111b79792c95eab4e12a9cb6c67355e..d56fa4a5b13ed1f06eb76b2fc525a6c49704baee 100644 (file)
@@ -93,15 +93,17 @@ void InsetIndex::write(ostream & os) const
 }
 
 
-void InsetIndex::addToToc(ParConstIterator const & cpit) const
+void InsetIndex::addToToc(DocIterator const & cpit)
 {
-       ParConstIterator pit = cpit;
-       pit.push_back(*this);
+       DocIterator pit = cpit;
+       pit.push_back(CursorSlice(*this));
 
        Toc & toc = buffer().tocBackend().toc("index");
        docstring str;
        str = getNewLabel(str);
        toc.push_back(TocItem(pit, 0, str));
+       // Proceed with the rest of the inset.
+       InsetCollapsable::addToToc(cpit);
 }