]> git.lyx.org Git - features.git/commitdiff
Fix conversion of beamer block arguments where the overlay argument and the closing...
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 13 Feb 2015 15:01:57 +0000 (16:01 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 13 Feb 2015 15:24:00 +0000 (16:24 +0100)
Fixes: #9411
lib/lyx2lyx/lyx_2_1.py
status.21x

index 703acdfc4419972e4f33217ede73d090fd7cd9ac..029b54d9959f2edcb31a343dde3c2994b395c59f 100644 (file)
@@ -3216,11 +3216,19 @@ def convert_beamerblocks(document):
                                         # Multiline ERT. Might contain TeX code.  Embrace in ERT.
                                         document.body[ertcontlastline : ertcontlastline + 1] = [
                                                                             document.body[ertcontlastline], '\\end_layout', '', '\\end_inset']
-                                        document.body[ertcontdivline : ertcontdivline + 1] = [document.body[ertcontdivline][:tok],
-                                                                            '\\end_layout', '', '\\end_inset', '', '', '\\begin_inset Argument 1',
-                                                                            'status collapsed', '', '\\begin_layout Plain Layout',
-                                                                            '\\begin_inset ERT', '', 'status open' '', '\\begin_layout Plain Layout',
-                                                                            document.body[ertcontdivline][tok + 2:]]
+                                        if ertcontdivline == ertcontfirstline:
+                                            document.body[ertcontdivline : ertcontdivline + 1] = [document.body[ertcontdivline][:tok],
+                                                                                '\\end_layout', '', '\\end_inset', '', '', '\\begin_inset Argument 1',
+                                                                                'status collapsed', '', '\\begin_layout Plain Layout',
+                                                                                '\\begin_inset ERT', '', 'status open' '', '\\begin_layout Plain Layout',
+                                                                                document.body[ertcontdivline][tok + 2:]]
+                                        else:
+                                            document.body[ertcontdivline : ertcontdivline + 1] = [document.body[ertcontdivline][:tok],
+                                                                                '\\end_layout', '', '\\end_inset', '',
+                                                                                '\\end_layout', '', '\\end_inset', '', '', '\\begin_inset Argument 1',
+                                                                                'status collapsed', '', '\\begin_layout Plain Layout',
+                                                                                '\\begin_inset ERT', '', 'status open' '', '\\begin_layout Plain Layout',
+                                                                                document.body[ertcontdivline][tok + 2:]]
                                     else:
                                         document.body[ertcontdivline : ertcontdivline + 1] = [document.body[ertcontdivline][:tok],
                                                                             '\\end_layout', '', '\\end_inset', '', '', '\\begin_inset Argument 1',
index 166988ef7ecd1b9522b759f774a9d8c856c7fb87..a41260b20e403f078f1717c29740bc8082d7bcd2 100644 (file)
@@ -60,7 +60,10 @@ What's new
 
 * LYX2LYX
 
--  Fix conversion of frame ends when frame is nested in inset (bug 9409).
+- Fix conversion of frame ends when frame is nested in inset (bug 9409).
+
+- Fix conversion of beamer block arguments where the overlay argument and the
+  closing title argument bracket share the same ERT (bug 9411).