[LyX/master] Footnote: (re-)add a fallback dummy counter
Juergen Spitzmueller
spitz at lyx.org
Fri Mar 6 17:02:45 UTC 2020
commit f5a2d770b841a1069ad9dec4a85ad0f154cc3599
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Fri Mar 6 18:21:18 2020 +0100
Footnote: (re-)add a fallback dummy counter
---
src/insets/InsetFoot.cpp | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/insets/InsetFoot.cpp b/src/insets/InsetFoot.cpp
index 5459f45..5865c7d 100644
--- a/src/insets/InsetFoot.cpp
+++ b/src/insets/InsetFoot.cpp
@@ -86,12 +86,14 @@ void InsetFoot::updateBuffer(ParIterator const & it, UpdateType utype, bool cons
custom_label_ = translateIfPossible(il.labelstring());
int val = cnts.value(count);
- if (cnts.hasCounter(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);
+ custom_label_ += ' ' + cnts.theCounter(count, lang->code());
+ if (deleted)
+ // un-step after deleted counter
+ cnts.set(count, val);
+ } else
+ custom_label_ += ' ' + from_ascii("#");
setLabel(custom_label_);
InsetCollapsible::updateBuffer(it, utype, deleted);
More information about the lyx-cvs
mailing list