]> git.lyx.org Git - features.git/commitdiff
Do not truncate references in outline pane (bug 9312).
authorRichard Heck <rgheck@lyx.org>
Thu, 30 Oct 2014 22:39:58 +0000 (18:39 -0400)
committerRichard Heck <rgheck@lyx.org>
Thu, 30 Oct 2014 22:39:58 +0000 (18:39 -0400)
src/insets/InsetLabel.cpp
src/insets/InsetRef.cpp
src/insets/InsetRef.h

index d78e2b4c7de09811a7d3883178e75e0adc52a688..35d5f543b8f86e4a0d32fa3799b3192c0ecd48e2 100644 (file)
@@ -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<InsetRef *>(it->first)->screenLabel(),
+                               static_cast<InsetRef *>(it->first)->getTOCString(),
                          output_active));
        }
 }
index 380a0ea7d2f30ce86c5eb696f8bb390c71a08e20..5ac6b469665bbc0bfd4bf734d8178ebe7e136ee9 100644 (file)
@@ -378,4 +378,9 @@ string const & InsetRef::getName(int type)
 }
 
 
+docstring InsetRef::getTOCString() const 
+{
+       return tooltip_.empty() ? screen_label_ : tooltip_;
+}
+
 } // namespace lyx
index 255b60db4880a36a7b84ab4a9f063e5a161d6bd0..002fa64d10ab656287fa10324064def6c6863f9d 100644 (file)
@@ -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; }