Get counter from InsetLayout, as elsewhere.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32310 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2009-12-03 23:22:45 +00:00
parent d964e6bdb9
commit 4843a76603

View File

@ -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);
}