[LyX/2.4.1-devel] Fix bug #8856.

Richard Kimberly Heck rikiheck at lyx.org
Sat Jun 1 16:37:16 UTC 2024


commit 26ab818033d6798bc88ea263f893e6f461d45221
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Sat Jun 1 12:36:00 2024 -0400

    Fix bug #8856.
    
    Show values of cross-references in tooltips.
    
    (cherry picked from commit 2a1c3dce57da0ad25451fc61f413ebbeba2448fe)
---
 src/insets/InsetRef.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp
index c8bc837a5f..c1ea8e4a93 100644
--- a/src/insets/InsetRef.cpp
+++ b/src/insets/InsetRef.cpp
@@ -534,8 +534,10 @@ void InsetRef::updateBuffer(ParIterator const & it, UpdateType, bool const /*del
 	if (use_formatted_ref || label.size() > maxLabelChars) {
 		tooltip_ = label;
 		support::truncateWithEllipsis(label, maxLabelChars);
-	} else
-		tooltip_ = from_ascii("");
+	} else {
+		// put cross-reference value into tooltip
+		tooltip_ = displayString(ref, cmd);
+	}
 
 	screen_label_ = label;
 	// If use_formatted_ref is active, this will be overwritten in addToToc.


More information about the lyx-cvs mailing list