commit 8b17b25764c90530a85ac32a9dcb2676b9d25d64
Author: Juergen Spitzmueller <[email protected]>
Date:   Fri Feb 13 16:01:57 2015 +0100

    Fix conversion of beamer block arguments where the overlay argument and the 
closing title argument bracket share the same ERT
    
    Fixes: #9411

diff --git a/lib/lyx2lyx/lyx_2_1.py b/lib/lyx2lyx/lyx_2_1.py
index 703acdf..029b54d 100644
--- a/lib/lyx2lyx/lyx_2_1.py
+++ b/lib/lyx2lyx/lyx_2_1.py
@@ -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',
diff --git a/status.21x b/status.21x
index 166988e..a41260b 100644
--- a/status.21x
+++ b/status.21x
@@ -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).
 
 
 

Reply via email to