]> 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, 4 Oct 2018 04:20:19 +0000 (00:20 -0400)
(cherry picked from commit df5805917be108b0cce8b502f7b6906f59b0e2ea)

src/mathed/InsetMathHull.cpp
status.23x

index 0a7ddd6d005858caa476ba2c5e7dea6899f102bf..0f7e9a85df7fbd1b39362121b8f326772999a8f9 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();
                        }
index ff82428777129859b722a40478514c0847045199..14a978aecd0524908c34b647fbc1de6f1b024386 100644 (file)
@@ -151,6 +151,8 @@ What's new
 - View and change Plural, Capitalization, and No Prefix options for 
   cross-references from the context menu (bug 11070).
 
+- Don't step counters in deleted material (bug 11135).
+
 
 * INTERNALS