]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetFloat.cpp
Fix for bug 4135
[lyx.git] / src / insets / InsetFloat.cpp
index a60a4ddc3e1a62717b253d9234667f66f6ac91f7..9a91f0c6cfd8958f8d9c0c5106bf7544b4df7acf 100644 (file)
@@ -16,6 +16,7 @@
 #include "Buffer.h"
 #include "BufferParams.h"
 #include "BufferView.h"
+#include "Counters.h"
 #include "Cursor.h"
 #include "debug.h"
 #include "DispatchResult.h"
@@ -183,6 +184,21 @@ bool InsetFloat::getStatus(Cursor & cur, FuncRequest const & cmd,
 }
 
 
+void InsetFloat::updateLabels(Buffer const & buf, ParIterator const & it)
+{
+       Counters & cnts = buf.params().getTextClass().counters();
+       string const saveflt = cnts.current_float();
+
+       // Tell to captions what the current float is
+       cnts.current_float(params().type);
+
+       InsetCollapsable::updateLabels(buf, it);
+
+       //reset afterwards
+       cnts.current_float(saveflt);
+}
+
+
 void InsetFloatParams::write(ostream & os) const
 {
        os << "Float " << type << '\n';