]> git.lyx.org Git - features.git/commitdiff
Fix revert chain.
authorJosé Matox <jamatos@lyx.org>
Mon, 19 Apr 2004 14:30:33 +0000 (14:30 +0000)
committerJosé Matox <jamatos@lyx.org>
Mon, 19 Apr 2004 14:30:33 +0000 (14:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8673 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/ChangeLog
lib/lyx2lyx/parser_tools.py

index 70e514ada025ac9cdc4cec95452f9440a09c9b84..2bd48692895181d537daec2640bb3714aeca9039 100644 (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>
        * lyx_1_4.py (convert_frameless_box): Replace instead of adding
        new code.
index 9b5a5559093dc585ffcb834b7d324420b225b7b6..95f60d22fc802b311732fefba46b0dbc5c618c65 100644 (file)
@@ -341,11 +341,16 @@ def chain(opt, initial_version):
                 steps.append(step[0])
     else:
         mode = "revert"
-        for step in format_relation:
+        relation_format = format_relation
+        relation_format.reverse()
+        last_step = None
+
+        for step in relation_format:
             if  final_step <= step[0] <= initial_step:
-                steps.insert(0, step[0])
+                steps.append(step[0])
+                last_step = step
 
-        if step[1][-1:] == opt.end:
-            del steps[0]
+        if last_step[1][-1] == opt.end:
+            steps.pop()
 
     return mode, steps