[LyX/master] Show child documents in outline with their paths.
Richard Kimberly Heck
rikiheck at lyx.org
Thu Sep 10 16:03:56 UTC 2020
commit 35aaa1c528bad7e8e6f78871d08f49daa134a2c0
Author: Daniel Ramöller <d.lyx at web.de>
Date: Thu Sep 10 12:28:20 2020 -0400
Show child documents in outline with their paths.
---
src/insets/InsetInclude.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
index 5400d5f..9ab4b98 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();
More information about the lyx-cvs
mailing list