]> git.lyx.org Git - features.git/commitdiff
reset bibitem counter in the second updateBuffer() routine as well
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 20 Apr 2019 17:42:29 +0000 (19:42 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 20 Apr 2019 17:42:29 +0000 (19:42 +0200)
Fixes: #8499
src/Buffer.cpp

index eeadf0a4f1d17c710e9eec7272cf7b57bd75c2c9..6f53a567db73837d6b58d27ead0b956ea4a7acb2 100644 (file)
@@ -5257,6 +5257,11 @@ void Buffer::updateBuffer(ParIterator & parit, UpdateType utype) const
        // to resolve macros in it.
        parit.text()->setMacrocontextPosition(parit);
 
+       // Reset bibitem counter in master (#8499)
+       Buffer const * const master = masterBuffer();
+       if (master == this && !d->ignore_parent)
+               master->params().documentClass().counters().reset(from_ascii("bibitem"));
+
        depth_type maxdepth = 0;
        pit_type const lastpit = parit.lastpit();
        for ( ; parit.pit() <= lastpit ; ++parit.pit()) {