]> git.lyx.org Git - features.git/commitdiff
fix glitch in index reversion
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 28 Jan 2023 16:06:35 +0000 (17:06 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 28 Jan 2023 16:06:35 +0000 (17:06 +0100)
lib/lyx2lyx/lyx_2_4.py

index a0609623b6196e731d546e2ce45d5a1af0c319fc..87cbba2097783b1c6bbaecaaddfabf91e4a1e16b 100644 (file)
@@ -4504,9 +4504,15 @@ def revert_index_macros(document):
                                 # construct the latex sequence
                                 icont = xicont + put_cmd_in_ert("@") + xxicont[1:]
                 if len(subentry) > 0:
-                    subentry2 = icont[1:]
+                    if (icont[0] == "\\begin_layout Plain Layout"):
+                        subentry2 = icont[1:]
+                    else:
+                       subentry2 = icont
                 else:
-                    subentry = icont[1:]
+                    if (icont[0] == "\\begin_layout Plain Layout"):
+                        subentry = icont[1:]
+                    else:
+                       subentry = icont
             elif imacro == "sortkey":
                 sortkey = icont
             # Everything stored. Delete subinset.