]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetWrap.cpp
Pure HTML output for math macros.
[lyx.git] / src / insets / InsetWrap.cpp
index 6ebabf1ca57173617182ac7bacc14d9e08ec712c..97fed142ec0a017fbbab2fae57d688f82544029e 100644 (file)
@@ -114,20 +114,26 @@ bool InsetWrap::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
-void InsetWrap::updateLabels(ParIterator const & it, bool out)
+void InsetWrap::updateBuffer(ParIterator const & it, UpdateType utype)
 {
        setLabel(_("wrap: ") + floatName(params_.type));
        Counters & cnts =
                buffer().masterBuffer()->params().documentClass().counters();
+       if (utype == OutputUpdate) {
+               // counters are local to the wrap
+               cnts.saveLastCounter();
+       }
        string const saveflt = cnts.current_float();
 
        // Tell to captions what the current float is
        cnts.current_float(params().type);
 
-       InsetCollapsable::updateLabels(it, out);
+       InsetCollapsable::updateBuffer(it, utype);
 
        // reset afterwards
        cnts.current_float(saveflt);
+       if (utype == OutputUpdate)
+               cnts.restoreLastCounter();
 }