commit 0c69a5eab287d0163854f85baed870a1c53fefdf
Author: Richard Kimberly Heck <rikih...@lyx.org>
Date:   Mon Jun 12 19:38:40 2023 -0400

    Fix bug #12796
---
 src/mathed/InsetMathHull.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 537d667..bdac94f 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -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)"),
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to