]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetRef.cpp
Fixup 572b06d6: reduce cache size for breakString
[lyx.git] / src / insets / InsetRef.cpp
index 716f8a70c06dbab5a19f0cc4d6d153b84e039b9b..eab3e69c1c840adc8d79b16ef86c846d4cd00159 100644 (file)
@@ -537,7 +537,9 @@ void InsetRef::addToToc(DocIterator const & cpit, bool output_active,
        broken_ = true;
        setBroken(broken_);
        shared_ptr<Toc> toc = backend.toc("label");
-       toc->push_back(TocItem(cpit, 0, screenLabel(), output_active));
+       if (TocBackend::findItem(*toc, 0, label) == toc->end())
+               toc->push_back(TocItem(cpit, 0, label, output_active, true));
+       toc->push_back(TocItem(cpit, 1, screenLabel(), output_active));
        shared_ptr<Toc> toc2 = backend.toc("brokenrefs");
        toc2->push_back(TocItem(cpit, 0, screenLabel(), output_active));
 }