]> git.lyx.org Git - features.git/commitdiff
Fix an off-by-one error in the reversion of beamer documents.
authorEnrico Forestieri <forenr@lyx.org>
Thu, 29 May 2014 08:55:30 +0000 (10:55 +0200)
committerRichard Heck <rgheck@lyx.org>
Thu, 29 May 2014 15:24:41 +0000 (11:24 -0400)
(cherry picked from commit dbd4d781dcbe73d347a76fed9ca51faf2841e133)

lib/lyx2lyx/lyx_2_1.py

index 0c170d4ae77a20e85fd95b555c0d72310f4bf2f5..eccf522edf31ff2aef40858a6d2632dca6c6b6a9 100644 (file)
@@ -3621,12 +3621,12 @@ def revert_newframes(document):
             continue
         endseq = j
         subst = ["\\begin_layout %s" % frame_dict[val]]
-        esubst = ["\\begin_layout EndFrame", "", "\\end_layout"]
+        esubst = ["", "\\begin_layout EndFrame", "", "\\end_layout"]
         endseq = endseq + len(esubst) - len(document.body[j : j])
         if document.body[j] == "\\end_deeper":
-            document.body[j : j] = [""] + esubst
-        else:
             document.body[j : j] = esubst
+        else:
+            document.body[j+1 : j+1] = esubst
         for q in range(i, j):
             if document.body[q] == "\\begin_layout %s" % val:
                 document.body[q] = "\\begin_layout %s" % document.default_layout