From 3ca8502ae9eb7ca6e1e09434b5a30c2dd58dafdd Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 30 Oct 2014 18:39:58 -0400 Subject: [PATCH] Do not truncate references in outline pane (bug 9312). (cherry picked from commit 1f45e6527a9ef95d4c3f6b1b38ae2a1263347945) --- src/insets/InsetLabel.cpp | 2 +- src/insets/InsetRef.cpp | 5 +++++ src/insets/InsetRef.h | 2 ++ status.21x | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) 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 e7e458f477..83cd81fbcd 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 21a7ec1c7c..96fd03a800 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; } diff --git a/status.21x b/status.21x index 44b6aecdf2..1a9f7fb7ee 100644 --- a/status.21x +++ b/status.21x @@ -44,6 +44,8 @@ What's new - Debug options in message pane are now sorted alphabetically. +- References no longer truncated in outliner (bug 9312). + * DOCUMENTATION AND LOCALIZATION -- 2.39.5