Просмотр исходного кода

Fix bug in shape copying and move copied shape

The closed attribute of the new shape was not copied

Move the copied shape slightly, so that it stands out.
Michael Pitidis 14 лет назад
Родитель
Сommit
9e579400bd
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      shape.py

+ 2 - 0
shape.py

@@ -149,6 +149,8 @@ class Shape(object):
         shape.points= [p for p in self.points]
         shape.points= [p for p in self.points]
         shape.fill = self.fill
         shape.fill = self.fill
         shape.selected = self.selected
         shape.selected = self.selected
+        shape._closed = self._closed
+        shape.moveBy(QPointF(2.0, 2.0))
         return shape
         return shape
 
 
     def __len__(self):
     def __len__(self):