]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFoot.cpp
Pure HTML output for math macros.
[lyx.git] / src / insets / InsetFoot.cpp
index 779c06727e6cb20b648393972fe1edaeb8a50e84..f311c1d61cfc227e57e46da070ed3975875ca322 100644 (file)
@@ -36,20 +36,26 @@ InsetFoot::InsetFoot(Buffer * buf)
 {}
 
 
-void InsetFoot::updateLabels(ParIterator const & it)
+void InsetFoot::updateBuffer(ParIterator const & it, UpdateType utype)
 {
        BufferParams const & bp = buffer().masterBuffer()->params();
        Counters & cnts = bp.documentClass().counters();
+       if (utype == OutputUpdate) {
+               // the footnote counter is local to this inset
+               cnts.saveLastCounter();
+       }
        Paragraph const & outer = it.paragraph();
        InsetLayout const & il = getLayout();
        docstring const & count = il.counter();
        if (!outer.layout().intitle && cnts.hasCounter(count)) {
-               cnts.step(count);
+               cnts.step(count, utype);
                custom_label_= translateIfPossible(il.labelstring()) 
                        + ' ' + cnts.theCounter(count, outer.getParLanguage(bp)->code());
                setLabel(custom_label_);        
        }
-       InsetCollapsable::updateLabels(it);
+       InsetCollapsable::updateBuffer(it, utype);
+       if (utype == OutputUpdate)
+               cnts.restoreLastCounter();      
 }