]> git.lyx.org Git - features.git/commitdiff
lyx2lyx: fix float reversion routines
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 28 Dec 2018 06:30:34 +0000 (07:30 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 28 Dec 2018 06:30:34 +0000 (07:30 +0100)
This jumped too wide with two subsequent floats.

lib/lyx2lyx/lyx_2_4.py

index 73fbdf66e727582a7ee4e8e00f9f8a7e251e76cf..7306193b03617dcbd934905fce9a723b49af10e6 100644 (file)
@@ -552,7 +552,7 @@ def revert_floatpclass(document):
             k = find_token(document.body, 'placement document', i, i + 2)
             if k != -1:
                 del document.body[k]
-            i = j
+            i += 1
             continue
         del document.body[k]
 
@@ -587,7 +587,7 @@ def revert_floatalignment(document):
         l = find_token(document.body, "\\begin_layout Plain Layout", i, j)
         if l == -1:
             document.warning("Can't find float layout!")
-            i = j
+            i += 1
             continue
         alcmd = []
         if alignment == "left":
@@ -598,7 +598,7 @@ def revert_floatalignment(document):
             alcmd = put_cmd_in_ert("\\raggedleft{}")
         if len(alcmd) > 0:
             document.body[l+1:l+1] = alcmd
-        i = j 
+        i += 1 
 
 
 def revert_tuftecite(document):