commit df5805917be108b0cce8b502f7b6906f59b0e2ea
Author: Richard Kimberly Heck <rikih...@lyx.org>
Date:   Thu May 3 00:05:21 2018 -0400

    Do not step equation numbers in deleted equations.
---
 src/mathed/InsetMathHull.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 8398347..ff7595f 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -316,8 +316,12 @@ void InsetMathHull::updateBuffer(ParIterator const & it, 
UpdateType utype)
                                counter_map[eqstr] = cnts.value(eqstr);
                        for (size_t i = 0; i != label_.size(); ++i) {
                                if (numbered(i)) {
-                                       cnts.step(eqstr, utype);
-                                       numbers_[i] = cnts.theCounter(eqstr, 
lang);
+                                       Paragraph const & par = it.paragraph();
+                                       if (!par.isDeleted(it.pos())) {
+                                               cnts.step(eqstr, utype);
+                                               numbers_[i] = 
cnts.theCounter(eqstr, lang);
+                                       } else
+                                               numbers_[i] = from_ascii("#");
                                } else
                                        numbers_[i] = empty_docstring();
                        }

Reply via email to