]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
Fix bug #7212: Paragraph::forToc has to include the labelString.
[lyx.git] / src / Paragraph.cpp
index 7928917ba6752f9b232ccd1db1f882f210bc366b..67965ef4c5950da18f47d9143db248161b87d68b 100644 (file)
@@ -2961,6 +2961,8 @@ docstring Paragraph::asString(pos_type beg, pos_type end, int options) const
 
 void Paragraph::forToc(docstring & os, size_t maxlen) const
 {
+       if (!d->params_.labelString().empty())
+               os += d->params_.labelString() + ' ';
        for (pos_type i = 0; i < size() && os.length() < maxlen; ++i) {
                if (isDeleted(i))
                        continue;