preview comes always after a latecommand

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26826 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2008-10-09 12:51:37 +00:00
parent dec8e81ebd
commit e90f9ea0f7

View File

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