From 35aaa1c528bad7e8e6f78871d08f49daa134a2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ram=C3=B6ller?= Date: Thu, 10 Sep 2020 12:28:20 -0400 Subject: [PATCH] Show child documents in outline with their paths. --- src/insets/InsetInclude.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index 5400d5f739..9ab4b9800d 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -1346,8 +1346,10 @@ void InsetInclude::addToToc(DocIterator const & cpit, bool output_active, Buffer const * const childbuffer = loadIfNeeded(); TocBuilder & b = backend.builder("child"); - docstring str = childbuffer ? childbuffer->fileName().displayName() - : from_ascii("?"); + string const fname = ltrim(to_utf8(params()["filename"])); + // mark non-existent childbuffer with FILE MISSING + docstring const str = (childbuffer ? from_ascii("") : _("FILE MISSING: ")) + + from_utf8(onlyFileName(fname)) + " (" + from_utf8(fname) + ")"; b.pushItem(cpit, str, output_active); b.pop();