Only shallow copy when filtering a playlist.
[hooke.git] / hooke / playlist.py
index cd5f9fbd3e37cc01e60dcd121b9a8d9761db0ce4..6dde157502ba5f4a2ef1cb12d0a09c41c0385df9 100644 (file)
@@ -138,11 +138,11 @@ class NoteIndexList (list):
 
     def filter(self, keeper_fn=lambda item:True, load_curves=True,
                *args, **kwargs):
-        c = copy.deepcopy(self)
+        c = copy.copy(self)
         if load_curves == True:
-            items = c.items(reverse=True)
+            items = self.items(reverse=True)
         else:
-            items = reversed(c)
+            items = reversed(self)
         for item in items: 
             if keeper_fn(item, *args, **kwargs) != True:
                 c.remove(item)