- return _("Opened Footnote Inset");
-}
-
-
-void InsetFoot::updateLabels(Buffer const & buf, ParIterator const & it)
-{
- TextClass const & tclass = buf.params().textClass();
- Counters & cnts = tclass.counters();
- docstring const foot = from_ascii("footnote");
- Paragraph const & outer = it.paragraph();
- if (!outer.layout()->intitle && cnts.hasCounter(foot)) {
- cnts.step(foot);
- //FIXME: the counter should format itself.
- setLabel(support::bformat(from_ascii("%1$s %2$s"),
- getLayout(buf.params()).labelstring(),
- cnts.theCounter(foot)));
-
+ BufferParams const & bp = buffer().masterBuffer()->params();
+ Counters & cnts = bp.documentClass().counters();
+ if (utype == OutputUpdate) {
+ // the footnote counter is local to this inset
+ cnts.saveLastCounter();