]> git.lyx.org Git - features.git/commitdiff
Do not step equation numbers in deleted equations.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 3 May 2018 04:05:21 +0000 (00:05 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 3 May 2018 04:05:21 +0000 (00:05 -0400)
src/mathed/InsetMathHull.cpp

index 83983477515083f7b351af2536726fee2e1fc7be..ff7595f33cfe5469fdbeb749c920a2db0afed42b 100644 (file)
@@ -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();
                        }