From 3cc6dae63f4c4e997f4249d2e1d557ddd7889f43 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 31 Dec 2012 14:30:44 +0100 Subject: [PATCH] More beamer reversion fixes --- lib/lyx2lyx/lyx_2_1.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py index 83885e33cb..944a8f9409 100644 --- a/lib/lyx2lyx/lyx_2_1.py +++ b/lib/lyx2lyx/lyx_2_1.py @@ -2832,7 +2832,20 @@ def revert_overprint(document): subst = ["\\begin_layout Standard"] + put_cmd_in_ert("\\begin{overprint}") esubst = ["\\end_layout", "", "\\begin_layout Standard"] + put_cmd_in_ert("\\end{overprint}") endseq = endseq + len(esubst) - len(document.body[j : j]) - document.body[j : j] = esubst + if document.body[j] == "\\end_deeper": + document.body[j : j] = ["\\end_deeper", ""] + esubst + else: + document.body[j : j] = esubst + r = i + while r < j: + if document.body[r] == "\\begin_deeper": + s = find_end_of(document.body, r, "\\begin_deeper", "\\end_deeper") + if s != -1: + document.body[r] = "" + document.body[s] = "" + r = s + continue + r = r + 1 argbeg = find_token(document.body, "\\begin_inset Argument 1", i, j) if argbeg != -1: argend = find_end_of_inset(document.body, argbeg) -- 2.39.5