]> git.lyx.org Git - lyx.git/commitdiff
Fix bug noticed by Scott.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 14 Jun 2020 19:33:06 +0000 (15:33 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sun, 14 Jun 2020 23:01:44 +0000 (19:01 -0400)
Since there may be subfloats, we do not want to move past the end
of a float when modifying it.

lib/lyx2lyx/lyx_2_4.py

index 22cc874a7bbc09a302e20bdf2ac70be02ab23230..f3c2fdc1c35d6d5ea1b41e8dc6d324727c34452e 100644 (file)
@@ -744,7 +744,9 @@ def revert_floatalignment(document):
             alcmd = put_cmd_in_ert("\\raggedleft{}")
         if len(alcmd) > 0:
             document.body[l+1:l+1] = alcmd
-        i = j
+        # There might be subfloats, so we do not want to move past
+        # the end of the inset.
+        i += 1
 
 def revert_tuftecite(document):
     """Revert \cite commands in tufte classes"""