From 4843a76603e9f23bbf5b383353d6c434642ebd53 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 3 Dec 2009 23:22:45 +0000 Subject: [PATCH] Get counter from InsetLayout, as elsewhere. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32310 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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 04fe39e482..779c06727e 100644 --- a/src/insets/InsetFoot.cpp +++ b/src/insets/InsetFoot.cpp @@ -40,14 +40,14 @@ void InsetFoot::updateLabels(ParIterator const & it) { BufferParams const & bp = buffer().masterBuffer()->params(); Counters & cnts = bp.documentClass().counters(); - static docstring const foot = from_ascii("footnote"); Paragraph const & outer = it.paragraph(); - if (!outer.layout().intitle && cnts.hasCounter(foot)) { - cnts.step(foot); - custom_label_= translateIfPossible(getLayout().labelstring()) - + ' ' + cnts.theCounter(foot, outer.getParLanguage(bp)->code()); - setLabel(custom_label_); - + InsetLayout const & il = getLayout(); + docstring const & count = il.counter(); + if (!outer.layout().intitle && cnts.hasCounter(count)) { + cnts.step(count); + custom_label_= translateIfPossible(il.labelstring()) + + ' ' + cnts.theCounter(count, outer.getParLanguage(bp)->code()); + setLabel(custom_label_); } InsetCollapsable::updateLabels(it); } -- 2.39.2