From: Richard Heck Date: Thu, 3 Dec 2009 23:22:45 +0000 (+0000) Subject: Get counter from InsetLayout, as elsewhere. X-Git-Tag: 2.0.0~4933 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4843a76603e9f23bbf5b383353d6c434642ebd53;p=features.git Get counter from InsetLayout, as elsewhere. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32310 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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); }