]> git.lyx.org Git - features.git/commitdiff
Minor code re-organization.
authorRichard Heck <rgheck@lyx.org>
Fri, 27 Oct 2017 15:50:51 +0000 (11:50 -0400)
committerRichard Heck <rgheck@lyx.org>
Fri, 27 Oct 2017 15:50:51 +0000 (11:50 -0400)
src/Buffer.cpp

index a781f2ada35ccb34191845b6c5c3f15330e92e57..05b9ad4dedffc09bbd3fcab026ca6eef755514ee 100644 (file)
@@ -4926,13 +4926,14 @@ void Buffer::Impl::setLabel(ParIterator & it, UpdateType utype) const
                        break;
                }
 
-               // Increase the master counter?
-               if (layout.stepmastercounter && needEnumCounterReset(it))
-                       counters.stepMaster(enumcounter, utype);
-
-               // Maybe we have to reset the enumeration counter.
-               if (!layout.resumecounter && needEnumCounterReset(it))
-                       counters.reset(enumcounter);
+               if (needEnumCounterReset(it)) {
+                       // Increase the master counter?
+                       if (layout.stepmastercounter)
+                               counters.stepMaster(enumcounter, utype);
+                       // Maybe we have to reset the enumeration counter.
+                       if (!layout.resumecounter)
+                               counters.reset(enumcounter);
+               }
                counters.step(enumcounter, utype);
 
                string const & lang = par.getParLanguage(bp)->code();