From: Richard Kimberly Heck Date: Sun, 14 Jun 2020 19:33:06 +0000 (-0400) Subject: Fix bug noticed by Scott. X-Git-Tag: lyx-2.4.0dev-acb2ca7b~747 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2a2f15ec03e1771a5d9ac26d0c71784de4d8e5f1;p=lyx.git Fix bug noticed by Scott. Since there may be subfloats, we do not want to move past the end of a float when modifying it. --- diff --git a/lib/lyx2lyx/lyx_2_4.py b/lib/lyx2lyx/lyx_2_4.py index 22cc874a7b..f3c2fdc1c3 100644 --- a/lib/lyx2lyx/lyx_2_4.py +++ b/lib/lyx2lyx/lyx_2_4.py @@ -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"""