]> git.lyx.org Git - features.git/commitdiff
Fix bug #12796
authorRichard Kimberly Heck <rikiheck@lyx.org>
Mon, 12 Jun 2023 23:38:40 +0000 (19:38 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Mon, 12 Jun 2023 23:38:40 +0000 (19:38 -0400)
src/mathed/InsetMathHull.cpp

index 537d6670c5ffa0d090ffb0b2acfd5c372a001f83..bdac94fcaef38a58d014a8b31df1624a24671f4f 100644 (file)
@@ -289,7 +289,6 @@ void InsetMathHull::addToToc(DocIterator const & pit, bool output_active,
                return;
        }
 
-       TocBuilder & b = backend.builder("equation");
        // compute first and last item
        row_type first = nrows();
        for (row_type row = 0; row != nrows(); ++row)
@@ -303,8 +302,10 @@ void InsetMathHull::addToToc(DocIterator const & pit, bool output_active,
        row_type last = nrows() - 1;
        for (; last != 0; --last)
                if (numbered(last))
-                       break;
-       // add equation numbers
+            break;
+
+    TocBuilder & b = backend.builder("equation");
+    // add equation numbers
        b.pushItem(pit, docstring(), output_active);
        if (first != last)
                b.argumentItem(bformat(from_ascii("(%1$s-%2$s)"),