commit 1f45e6527a9ef95d4c3f6b1b38ae2a1263347945
Author: Richard Heck <[email protected]>
Date: Thu Oct 30 18:39:58 2014 -0400
Do not truncate references in outline pane (bug 9312).
diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp
index d78e2b4..35d5f54 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<InsetRef
*>(it->first)->screenLabel(),
+ static_cast<InsetRef
*>(it->first)->getTOCString(),
output_active));
}
}
diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp
index 380a0ea..5ac6b46 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 255b60d..002fa64 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; }