Fix revert chain.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8673 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2004-04-19 14:30:33 +00:00
parent 3cd2264196
commit 296632a2c3
2 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2004-04-19 José Matos <jamatos@lyx.orrg>
* parser_tools.py (chain): fix the detection of the last format for
revertions.
2004-04-19 Martin Vermeer <martin.vermeer@hut.fi> 2004-04-19 Martin Vermeer <martin.vermeer@hut.fi>
* lyx_1_4.py (convert_frameless_box): Replace instead of adding * lyx_1_4.py (convert_frameless_box): Replace instead of adding
new code. new code.

View File

@ -341,11 +341,16 @@ def chain(opt, initial_version):
steps.append(step[0]) steps.append(step[0])
else: else:
mode = "revert" mode = "revert"
for step in format_relation: relation_format = format_relation
if final_step <= step[0] <= initial_step: relation_format.reverse()
steps.insert(0, step[0]) last_step = None
if step[1][-1:] == opt.end: for step in relation_format:
del steps[0] if final_step <= step[0] <= initial_step:
steps.append(step[0])
last_step = step
if last_step[1][-1] == opt.end:
steps.pop()
return mode, steps return mode, steps