lyx2lyx/lyx_2_0.py: fix bug in the feyn reversion routine

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35461 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2010-09-20 01:55:34 +00:00
parent b9a5fda7e2
commit 1787e837e7

View File

@ -2161,6 +2161,7 @@ def revert_rule(document):
return
def revert_diagram(document):
" Add the feyn package if \\Diagram is used in math "
i = 0
re_diagram = re.compile(r'\\begin_inset Formula .*\\Diagram', re.DOTALL)
while True:
@ -2175,7 +2176,8 @@ def revert_diagram(document):
if not m:
i += 1
continue
add_to_preamble(document, "\\use_package{feyn}")
add_to_preamble(document, ["% this command was inserted by lyx2lyx"])
add_to_preamble(document, "\\usepackage{feyn}")
# only need to do it once!
return