X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTocBackend.cpp;h=656f326e15c956aef9495823e5d6ef97f8261800;hb=57a8ea32c0a2443c188a522b516100bb74ec4a8d;hp=2b3e9c81013b225fec76fd213da9dde23303b61b;hpb=8adcffff0c1a7c681be989b8c2b77f761483b0da;p=lyx.git diff --git a/src/TocBackend.cpp b/src/TocBackend.cpp index 2b3e9c8101..656f326e15 100644 --- a/src/TocBackend.cpp +++ b/src/TocBackend.cpp @@ -70,7 +70,7 @@ docstring const & TocItem::str() const docstring const & TocItem::tooltip() const { - return tooltip_; + return tooltip_.empty() ? str_ : tooltip_; } @@ -149,7 +149,7 @@ bool TocBackend::updateItem(DocIterator const & dit) *static_cast(inset).paragraphs().begin(); if (!par.labelString().empty()) tocstring = par.labelString() + ' '; - tocstring += inset_par.asString(AS_STR_INSETS | AS_STR_INTOC); + tocstring += inset_par.asString(AS_STR_INSETS); break; } } @@ -157,7 +157,7 @@ bool TocBackend::updateItem(DocIterator const & dit) int const toclevel = par.layout().toclevel; if (toclevel != Layout::NOT_IN_TOC && toclevel >= min_toclevel && tocstring.empty()) - tocstring = par.asString(AS_STR_LABEL | AS_STR_INSETS | AS_STR_INTOC); + tocstring = par.asString(AS_STR_LABEL | AS_STR_INSETS); const_cast(*toc_item).str_ = tocstring;