From b8cac52759f77564d35f40e479896c4266d9b9ac Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Fri, 6 Mar 2020 18:16:34 +0100 Subject: [PATCH] Use real counter in deleted footnotes --- src/insets/InsetFoot.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/insets/InsetFoot.cpp b/src/insets/InsetFoot.cpp index 5b1152754c..5459f457c9 100644 --- a/src/insets/InsetFoot.cpp +++ b/src/insets/InsetFoot.cpp @@ -85,13 +85,13 @@ void InsetFoot::updateBuffer(ParIterator const & it, UpdateType utype, bool cons docstring const & count = il.counter(); custom_label_ = translateIfPossible(il.labelstring()); - Paragraph const & par = it.paragraph(); - if (!par.isDeleted(it.pos())) { - if (cnts.hasCounter(count)) - cnts.step(count, utype); - custom_label_ += ' ' + cnts.theCounter(count, lang->code()); - } else - custom_label_ += ' ' + from_ascii("#"); + int val = cnts.value(count); + if (cnts.hasCounter(count)) + cnts.step(count, utype); + custom_label_ += ' ' + cnts.theCounter(count, lang->code()); + if (deleted) + // un-step after deleted counter + cnts.set(count, val); setLabel(custom_label_); InsetCollapsible::updateBuffer(it, utype, deleted); -- 2.39.5