]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFoot.cpp
Pure HTML output for math macros.
[lyx.git] / src / insets / InsetFoot.cpp
index f5b3e4a8d78b545a15aa25a90bb2e78bacd7dc8a..f311c1d61cfc227e57e46da070ed3975875ca322 100644 (file)
@@ -36,20 +36,26 @@ InsetFoot::InsetFoot(Buffer * buf)
 {}
 
 
-void InsetFoot::updateLabels(ParIterator const & it, bool out)
+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, out);
+       InsetCollapsable::updateBuffer(it, utype);
+       if (utype == OutputUpdate)
+               cnts.restoreLastCounter();      
 }