From 0c69a5eab287d0163854f85baed870a1c53fefdf Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Mon, 12 Jun 2023 19:38:40 -0400 Subject: [PATCH] Fix bug #12796 --- src/mathed/InsetMathHull.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 537d6670c5..bdac94fcae 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)"), -- 2.39.5