]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFoot.cpp
Some things did not need to be mutable after all
[lyx.git] / src / insets / InsetFoot.cpp
index 9df6f5d590f60073648efd7bc38475951f4c3244..e87de41b99aa61d252425db840e98b5827c2c9d2 100644 (file)
@@ -26,6 +26,7 @@
 #include "support/debug.h"
 #include "support/docstream.h"
 #include "support/gettext.h"
+#include "support/lstrings.h"
 
 using namespace std;
 
@@ -74,17 +75,21 @@ void InsetFoot::updateBuffer(ParIterator const & it, UpdateType utype)
 }
 
 
-void InsetFoot::addToToc(DocIterator const & cpit, bool output_active) const
+void InsetFoot::addToToc(DocIterator const & cpit, bool output_active,
+                                                UpdateType utype) const
 {
        DocIterator pit = cpit;
        pit.push_back(CursorSlice(const_cast<InsetFoot &>(*this)));
-
-       Toc & toc = buffer().tocBackend().toc("footnote");
-       docstring str = custom_label_ + ": ";
+       
+       docstring str;
        text().forOutliner(str, TOC_ENTRY_LENGTH);
-       toc.push_back(TocItem(pit, 0, str, output_active, toolTipText(docstring(), 3, 60)));
+       str = custom_label_ + ": " + str;
+       
+       shared_ptr<Toc> toc = buffer().tocBackend().toc("footnote");
+       toc->push_back(TocItem(pit, 0, str, output_active));
+       
        // Proceed with the rest of the inset.
-       InsetFootlike::addToToc(cpit, output_active);
+       InsetFootlike::addToToc(cpit, output_active, utype);
 }