]> git.lyx.org Git - features.git/blobdiff - src/TocBackend.cpp
There does not appear to be any need to update the entire Buffer
[features.git] / src / TocBackend.cpp
index e47ca9b63066502ff39b1666161afd9c2d18b913..5599e1f362313fc0e01278a7dd6282eb2309545d 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "Buffer.h"
 #include "BufferParams.h"
+#include "Cursor.h"
 #include "FloatList.h"
 #include "FuncRequest.h"
 #include "InsetList.h"
@@ -266,8 +267,11 @@ shared_ptr<TocBuilder> TocBackend::builder(string const & type)
 // TocItem creation and update should be made in a dedicated function and
 // updateItem should be rewritten to uniformly update the matching items from
 // all TOCs.
-bool TocBackend::updateItem(DocIterator const & dit)
+bool TocBackend::updateItem(DocIterator const & dit_in)
 {
+       // we need a text
+       DocIterator dit = dit_in.getInnerText();
+
        if (dit.text()->getTocLevel(dit.pit()) == Layout::NOT_IN_TOC)
                return false;