Browse Source

Switch to update instead of repaint to fix flicker

Michael Pitidis 13 years ago
parent
commit
c736abf0c7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      canvas.py

+ 2 - 2
canvas.py

@@ -251,15 +251,15 @@ class Canvas(QWidget):
             self.selectedShape.selected = False
             self.selectedShape.selected = False
             self.selectedShape = None
             self.selectedShape = None
             self.setHiding(False)
             self.setHiding(False)
-            self.repaint()
             self.selectionChanged.emit(False)
             self.selectionChanged.emit(False)
+            self.update()
 
 
     def deleteSelected(self):
     def deleteSelected(self):
         if self.selectedShape:
         if self.selectedShape:
             shape = self.selectedShape
             shape = self.selectedShape
             self.shapes.remove(self.selectedShape)
             self.shapes.remove(self.selectedShape)
             self.selectedShape = None
             self.selectedShape = None
-            self.repaint()
+            self.update()
             return shape
             return shape
 
 
     def copySelectedShape(self):
     def copySelectedShape(self):