From 28796bcb63603ed2b9a8d0df8741417189c86e9b Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 13 Aug 2019 07:29:07 +0200 Subject: [PATCH] lyx2lyx: remove landscape module in reversion --- lib/lyx2lyx/lyx_2_4.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index 147ff91da8..15d83b8145 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -642,7 +642,7 @@ def revert_lscape(document): while True: i = find_token(document.body, "\\begin_inset Flex Landscape", i+1) if i == -1: - return + break j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: Can't find end of Landscape inset") @@ -657,6 +657,7 @@ def revert_lscape(document): document.body[i : i + 4] = put_cmd_in_ert("\\begin{landscape}") add_to_preamble(document, ["\\usepackage{pdflscape}"]) + document.del_module("landscape") def convert_fontenc(document):