]> git.lyx.org Git - features.git/blobdiff - lib/lyx2lyx/LyX.py
lyx2lyx: correct placement of (new) local layout
[features.git] / lib / lyx2lyx / LyX.py
index 24a12708f23a449a69e43473d5e303ed7ad8b8ce..b91350100e5144c071f4e37a4a03b6a970107a00 100644 (file)
@@ -621,7 +621,7 @@ class LyX_base:
         modlist = self.get_module_list()
         if module not in modlist:
             return False
-        self.set_module_list([line for line in modlist if line != "ruby"])
+        self.set_module_list([line for line in modlist if line != module])
         return True
 
     def get_module_list(self):
@@ -797,7 +797,7 @@ class LyX_base:
                 # this should not happen
                 self.warning("Malformed LyX document! No \\language header found!")
                 return
-            self.header[k-1 : k-1] = ["\\begin_local_layout", "\\end_local_layout"]
+            self.header[k : k] = ["\\begin_local_layout", "\\end_local_layout"]
             i = k - 1
 
         j = find_end_of(self.header, i, "\\begin_local_layout", "\\end_local_layout")