]> git.lyx.org Git - features.git/commitdiff
lyx_2_2.py: fix box reversion routine again
authorUwe Stöhr <uwestoehr@lyx.org>
Thu, 20 Apr 2017 23:05:54 +0000 (01:05 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Thu, 20 Apr 2017 23:05:54 +0000 (01:05 +0200)
silly mistake, now Math.lyx reverts correctly again.

lib/lyx2lyx/lyx_2_2.py

index 37b83e8e72998fa4735f3b073b3e9332363378aa..996c22684ef1be04a76505f5d69c940e3f7fe249 100644 (file)
@@ -1092,11 +1092,13 @@ def revert_BoxFeatures(document):
         if i == -1:
             return
         binset = find_token(document.body, "\\begin_inset Box", i - 11)
-        if binset == -1:
-            return # then "thickness" is is just a word in the text
+        if binset == -1 or binset != i - 11:
+            i = i + 1
+            continue # then "thickness" is is just a word in the text
         einset = find_end_of_inset(document.body, binset)
         if einset == -1:
             document.warning("Malformed LyX document: Can't find end of box inset!")
+            i = i + 1
             continue
         # read out the values
         beg = document.body[i].find('"');