]> git.lyx.org Git - lyx.git/commitdiff
Fix bug #8856.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 1 Jun 2024 16:36:00 +0000 (12:36 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 1 Jun 2024 16:37:05 +0000 (12:37 -0400)
Show values of cross-references in tooltips.

(cherry picked from commit 2a1c3dce57da0ad25451fc61f413ebbeba2448fe)

src/insets/InsetRef.cpp

index c8bc837a5f4d50b0ec74dd843fe87d12426aed16..c1ea8e4a9379ab5dc3f1e823d16c8b6406a6be9c 100644 (file)
@@ -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.