Viewer.py
changeset 162 e746ff4aa8be
parent 158 8a770e8d745a
child 165 e464a4e4e06d
--- a/Viewer.py	Tue Jan 29 11:09:49 2008 +0100
+++ b/Viewer.py	Tue Jan 29 18:30:47 2008 +0100
@@ -2184,7 +2184,7 @@
     
     def Cut(self):
         if self.IsBlock(self.SelectedElement):
-            self.ParentWindow.SetCopyBuffer(self.SelectedElement.Clone())
+            self.ParentWindow.SetCopyBuffer(self.SelectedElement.Clone(self))
             rect = self.SelectedElement.GetRedrawRect(1, 1)
             self.SelectedElement.Delete()
             self.SelectedElement = None
@@ -2194,7 +2194,7 @@
         
     def Copy(self):
         if self.IsBlock(self.SelectedElement):
-            self.ParentWindow.SetCopyBuffer(self.SelectedElement.Clone())
+            self.ParentWindow.SetCopyBuffer(self.SelectedElement.Clone(self))
             
     def Paste(self):
         element = self.ParentWindow.GetCopyBuffer()
@@ -2230,10 +2230,10 @@
             while (format%i).upper() in names:
                 i += 1
             name = format%i
-            block = element.Clone(id, name, pos)
+            block = element.Clone(self, id, name, pos)
         else:
             name = None
-            block = element.Clone(id, pos=pos)
+            block = element.Clone(self, id, pos=pos)
         self.AddBlock(block)
         if isinstance(block, Comment):
             self.Controler.AddEditedElementComment(self.TagName, id)