X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetInclude.cpp;h=506f3586e071e50f833578198cd83bb4a7d4a4ca;hb=0a6ff99f28686066675848f3410f77c0947bc357;hp=fe0c1edae48e374b5d87df5d80093f28b6f1bfc9;hpb=be468136df13bc705fec9a22f0d0fd52036afbe4;p=lyx.git diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index fe0c1edae4..506f3586e0 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -76,6 +76,7 @@ namespace { docstring const uniqueID() { + // FIXME THREAD static unsigned int seed = 1000; return "file" + convert(++seed); } @@ -407,7 +408,9 @@ Buffer * InsetInclude::getChildBuffer() const { Buffer * childBuffer = loadIfNeeded(); - // FIXME: recursive includes + // FIXME RECURSIVE INCLUDE + // This isn't sufficient, as the inclusion could be downstream. + // But it'll have to do for now. return (childBuffer == &buffer()) ? 0 : childBuffer; } @@ -972,6 +975,11 @@ void InsetInclude::collectBibKeys(InsetIterator const & /*di*/) const Buffer * child = loadIfNeeded(); if (!child) return; + // FIXME RECURSIVE INCLUDE + // This isn't sufficient, as the inclusion could be downstream. + // But it'll have to do for now. + if (child == &buffer()) + return; child->collectBibKeys(); }