]> git.lyx.org Git - features.git/commitdiff
Fix bug #11378.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 29 Dec 2018 04:02:47 +0000 (23:02 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Sat, 29 Dec 2018 04:04:46 +0000 (23:04 -0500)
(cherry picked from commit f11a51be35b54882e77d2cce189fedb2085412dd)

lib/lyx2lyx/lyx2lyx_tools.py
status.23x

index f63f4026167a8f4b563beb01bc75f216d50863dc..ba179a78c616fa2e74cdc9cbb744debd66c452a1 100644 (file)
@@ -450,7 +450,7 @@ def revert_font_attrs(lines, name, LaTeXname):
   while True:
     i = find_token(lines, name + ' on', i)
     if i == -1:
-      return changed
+      break
     j = find_token(lines, name + ' default', i)
     k = find_token(lines, name + ' on', i + 1)
     # if there is no default set, the style ends with the layout
@@ -464,6 +464,16 @@ def revert_font_attrs(lines, name, LaTeXname):
     changed = True
     i += 1
 
+  # now delete all remaining lines that manipulate this attribute
+  i = 0
+  while True:
+    i = find_token(lines, name, i)
+    if i = -1:
+      break
+    del lines[i]
+
+  return changed
+
 
 def revert_layout_command(lines, name, LaTeXname):
   " Reverts a command from a layout to TeX code "
index 26cb69799e533d4b08e3da796481873c7e6f47c7..2490a673f7160c82cfd89b5a962ab04b921941c1 100644 (file)
@@ -99,6 +99,8 @@ What's new
 
 - Speed up some lyx2lyx conversions (bug 11200).
 
+- Fix routine that left some old parameters unremoved (bug 11373).
+
 
 * TEX2LYX