]> git.lyx.org Git - lyx.git/commitdiff
lyx2lyx/lyx_2_2.py: backport another box reversion issue
authorUwe Stöhr <uwestoehr@lyx.org>
Mon, 24 Apr 2017 21:02:09 +0000 (23:02 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Mon, 24 Apr 2017 21:02:09 +0000 (23:02 +0200)
lib/lyx2lyx/lyx_2_2.py

index c30477de17d149fe251ed4560423c8807461935e..a65f8ca67d1b10e539d0f1b38c2da9a829d06a6a 100644 (file)
@@ -1093,11 +1093,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('"');