From 70b0df85c80120e0a0eeaa9e3fec721d91d53849 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 22 Oct 2017 19:08:10 +0200 Subject: [PATCH] Do not add deleted text to inset button label. Fixes: #10775 --- src/insets/InsetCollapsible.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/insets/InsetCollapsible.cpp b/src/insets/InsetCollapsible.cpp index 11c9e2a43d..c429c51b41 100644 --- a/src/insets/InsetCollapsible.cpp +++ b/src/insets/InsetCollapsible.cpp @@ -423,6 +423,8 @@ docstring const InsetCollapsible::getNewLabel(docstring const & l) const pos_type i = 0; pos_type j = 0; for (; i < n && j < p_siz; ++j) { + if (paragraphs().begin()->isDeleted(j)) + continue; if (paragraphs().begin()->isInset(j)) { if (!paragraphs().begin()->getInset(j)->isChar()) continue; -- 2.39.2