]> git.lyx.org Git - features.git/commitdiff
Fix framed notes lyx2lyx reversion. Again, this was a mechanical fix. It should be...
authorRichard Heck <rgheck@comcast.net>
Sun, 1 Jun 2008 01:50:39 +0000 (01:50 +0000)
committerRichard Heck <rgheck@comcast.net>
Sun, 1 Jun 2008 01:50:39 +0000 (01:50 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25035 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_1_6.py

index e6158202c85a05710b3d81eab551fe187b7b254c..7252da70ad5e5b771751cf0b7a3ddd36350d880d 100644 (file)
@@ -1423,8 +1423,13 @@ def revert_framed_notes(document):
             del document.body[i+1:k]
         else:
             document.body[i] = document.body[i].replace("\\begin_inset Box Shaded", "\\begin_inset Box Frameless")
-            document.body.insert(l + 1, "\\begin_inset Note Shaded\n" + status + "\n\\begin_layout Standard\n")
-            document.body.insert(m + 1, "\\end_layout\n\\end_inset")
+            subst1 = [document.body[l],
+                      "\\begin_inset Note Shaded",
+                      status,
+                      '\\begin_layout Standard']
+            document.body[l:l + 1] = subst1
+            subst2 = [document.body[m], "\\end_layout", "\\end_inset"]
+            document.body[m:m + 1] = subst2
         i = i + 1