From: Richard Heck Date: Thu, 30 Oct 2014 22:39:58 +0000 (-0400) Subject: Do not truncate references in outline pane (bug 9312). X-Git-Tag: 2.2.0alpha1~1582 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1f45e6527a9ef95d4c3f6b1b38ae2a1263347945;p=features.git Do not truncate references in outline pane (bug 9312). --- diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp index d78e2b4c7d..35d5f543b8 100644 --- a/src/insets/InsetLabel.cpp +++ b/src/insets/InsetLabel.cpp @@ -189,7 +189,7 @@ void InsetLabel::addToToc(DocIterator const & cpit, bool output_active) const output_active)); else toc.push_back(TocItem(ref_pit, 1, - static_cast(it->first)->screenLabel(), + static_cast(it->first)->getTOCString(), output_active)); } } diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp index 380a0ea7d2..5ac6b46966 100644 --- a/src/insets/InsetRef.cpp +++ b/src/insets/InsetRef.cpp @@ -378,4 +378,9 @@ string const & InsetRef::getName(int type) } +docstring InsetRef::getTOCString() const +{ + return tooltip_.empty() ? screen_label_ : tooltip_; +} + } // namespace lyx diff --git a/src/insets/InsetRef.h b/src/insets/InsetRef.h index 255b60db48..002fa64d10 100644 --- a/src/insets/InsetRef.h +++ b/src/insets/InsetRef.h @@ -45,6 +45,8 @@ public: docstring toolTip(BufferView const &, int, int) const { return tooltip_; } /// + docstring getTOCString() const; + /// bool hasSettings() const { return true; } /// InsetCode lyxCode() const { return REF_CODE; }