From: Juergen Spitzmueller Date: Wed, 21 May 2014 09:37:51 +0000 (+0200) Subject: Fix nesting in some beamer reversion methods. X-Git-Tag: 2.1.1~50 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ad723c41b6c801ff3c8d818f7dd455e477755c44;p=features.git Fix nesting in some beamer reversion methods. Patch by Enrico --- diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index 6931a3e93e..0c170d4ae7 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -3148,12 +3148,12 @@ def revert_overprint(document): continue endseq = j subst = ["\\begin_layout Standard"] + put_cmd_in_ert("\\begin{overprint}") - esubst = ["\\end_layout", "", "\\begin_layout Standard"] + put_cmd_in_ert("\\end{overprint}") + esubst = ["\\begin_layout Standard"] + put_cmd_in_ert("\\end{overprint}") endseq = endseq + len(esubst) - len(document.body[j : j]) if document.body[j] == "\\end_deeper": - document.body[j : j] = ["\\end_deeper", ""] + esubst + document.body[j : j] = [""] + esubst + ["", "\\end_layout"] else: - document.body[j : j] = esubst + document.body[j : j] = ["\\end_layout", ""] + esubst r = i while r < j: if document.body[r] == "\\begin_deeper": @@ -3518,10 +3518,10 @@ def revert_fragileframe(document): continue endseq = j subst = ["\\begin_layout Standard"] + put_cmd_in_ert("\\begin{frame}") - esubst = ["\\end_layout", "", "\\begin_layout Standard"] + put_cmd_in_ert("\\end{frame}") + esubst = ["\\begin_layout Standard"] + put_cmd_in_ert("\\end{frame}") endseq = endseq + len(esubst) - len(document.body[j : j]) if document.body[j] == "\\end_deeper": - document.body[j : j] = ["\\end_deeper", ""] + esubst + document.body[j : j] = [""] + esubst + ["", "\\end_layout"] else: document.body[j : j] = esubst for q in range(i, j): @@ -3621,10 +3621,10 @@ def revert_newframes(document): continue endseq = j subst = ["\\begin_layout %s" % frame_dict[val]] - esubst = ["\\end_layout", "", "\\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] = ["\\end_deeper", ""] + esubst + document.body[j : j] = [""] + esubst else: document.body[j : j] = esubst for q in range(i, j): diff --git a/status.21x b/status.21x index 26b4c850a5..f36027066e 100644 --- a/status.21x +++ b/status.21x @@ -84,6 +84,8 @@ What's new - Fix import of some argument insets. +- Fix some nesting problems in reversion of some beamer environments to 2.0 format. + * USER INTERFACE