Assign InsetBibtex to appropriate toc level

Fixes #11863

(cherry picked from commit 92ba05c53b)
This commit is contained in:
Juergen Spitzmueller 2020-05-15 10:14:22 +02:00
parent 119d38bedf
commit 991ef3840e
2 changed files with 9 additions and 3 deletions

View File

@ -901,9 +901,12 @@ void InsetBibtex::addToToc(DocIterator const & cpit, bool output_active,
return;
docstring const str = getRefLabel();
TocBuilder & b = backend.builder("tableofcontents");
b.pushItem(cpit, str, output_active);
b.pop();
shared_ptr<Toc> toc = backend.toc("tableofcontents");
// Assign to appropriate level
int const item_depth =
(buffer().masterParams().documentClass().hasLaTeXLayout("chapter"))
? 1 : 2;
toc->push_back(TocItem(cpit, item_depth, str, output_active));
}

View File

@ -123,6 +123,9 @@ What's new
- Fix disappearing selection with clipboard managers on X11 (bug 11715).
- Correct hierarchy level of Bib(la)tex inset in outliner if "Show in Toc"
is selected (bug 11863).
* INTERNALS