From: Juergen Spitzmueller Date: Fri, 6 Mar 2020 17:16:34 +0000 (+0100) Subject: Use real counter in deleted footnotes X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d3f06a8ccbb93928817734df93e5d09ef2858ac1;p=features.git Use real counter in deleted footnotes --- 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);