]> git.lyx.org Git - lyx.git/commitdiff
set toc_string_ before the label is being truncated
authorJuergen Spitzmueller <spitz@lyx.org>
Tue, 6 Aug 2024 08:57:11 +0000 (10:57 +0200)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Tue, 6 Aug 2024 15:08:03 +0000 (11:08 -0400)
We do not want truncated items in the outliner.

(cherry picked from commit 8aeee03e3ad61b437fb8ef9a4b5c4744f5b18c22)

src/insets/InsetRef.cpp

index 4565128e0ceeaae0259618f6b6a8b7b8b0cbd757..a75de56d5bffc0bfa04a3f019ab93c3b9dba753d 100644 (file)
@@ -530,6 +530,7 @@ void InsetRef::updateBuffer(ParIterator const & it, UpdateType, bool const /*del
 
        bool const use_formatted_ref = buffer().params().use_formatted_ref;
        unsigned int const maxLabelChars = 24;
+       toc_string_ = label;
        // Show label in tooltip when formatted references are shown in the work
        // area or it is too long
        if (use_formatted_ref || label.size() > maxLabelChars) {
@@ -539,8 +540,7 @@ void InsetRef::updateBuffer(ParIterator const & it, UpdateType, bool const /*del
                // put cross-reference value into tooltip
                tooltip_ = displayString(ref, cmd);
        }
-       toc_string_ = label;
-       
+
        // Note: This could be changed later, in addToToc, if we are using
        // fomatted references in the work area.
        screen_label_ = label;