]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetMarginal.cpp
fix http://bugzilla.lyx.org/show_bug.cgi?id=4998
[lyx.git] / src / insets / InsetMarginal.cpp
index 46485e439486d917eb33df0817e44663b48c823f..9a21a89a788d14207ad85569f2ab7dd2e6b8e754 100644 (file)
@@ -66,15 +66,17 @@ int InsetMarginal::docbook(odocstream & os,
 }
 
 
-void InsetMarginal::addToToc(ParConstIterator const & cpit) const
+void InsetMarginal::addToToc(DocIterator const & cpit)
 {
-       ParConstIterator pit = cpit;
-       pit.push_back(*this);
+       DocIterator pit = cpit;
+       pit.push_back(CursorSlice(*this));
 
        Toc & toc = buffer().tocBackend().toc("marginalnote");
        docstring str;
        str = getNewLabel(str);
        toc.push_back(TocItem(pit, 0, str));
+       // Proceed with the rest of the inset.
+       InsetFootlike::addToToc(cpit);
 }
 
 } // namespace lyx