]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetCaption.cpp
Fix caption counter in longtables (see #8993).
[features.git] / src / insets / InsetCaption.cpp
index 2303a1d82a530eb52620cb0879c0ad9f0187c79f..f1f0983810cc8b0b64c16362f86ad36cbb092b5c 100644 (file)
@@ -404,7 +404,9 @@ void InsetCaption::updateBuffer(ParIterator const & it, UpdateType utype)
                docstring const labelstring = isAscii(lstring) ?
                                master.B_(to_ascii(lstring)) : lstring;
                if (cnts.hasCounter(counter)) {
-                       cnts.step(counter, utype);
+                       // for longtables, we step the counter upstream
+                       if (!cnts.isLongtable())
+                               cnts.step(counter, utype);
                        sec = cnts.theCounter(counter, lang);
                }
                if (labelstring != master.B_("standard")) {