]> git.lyx.org Git - features.git/commitdiff
preview comes always after a latecommand
authorJosé Matox <jamatos@lyx.org>
Thu, 9 Oct 2008 12:51:37 +0000 (12:51 +0000)
committerJosé Matox <jamatos@lyx.org>
Thu, 9 Oct 2008 12:51:37 +0000 (12:51 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26826 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_1_6.py

index 057780496106cc7a69b243fed4b49746f2bc821b..c2dafd1209bc21affc4159c8f3e12a7dd976f3b6 100644 (file)
@@ -1429,11 +1429,6 @@ def revert_include(document):
     if i == -1:
       return
     nextline = i + 1
-    if r0.match(document.body[nextline]):
-      previewline = document.body[nextline]
-      nextline += 1
-    else:
-      previewline = ""
     m = r1.match(document.body[nextline])
     if m == None:
       document.warning("Malformed LyX document: No LatexCommand line for `" +
@@ -1442,6 +1437,11 @@ def revert_include(document):
       continue
     cmd = m.group(1)
     nextline += 1
+    if r0.match(document.body[nextline]):
+      previewline = document.body[nextline]
+      nextline += 1
+    else:
+      previewline = ""
     m = r2.match(document.body[nextline])
     if m == None:
       document.warning("Malformed LyX document: No filename line for `" + \