|
@@ -107,11 +107,14 @@ class Canvas(QWidget):
|
|
|
self.repaint()
|
|
|
|
|
|
def mouseDoubleClickEvent(self, ev):
|
|
|
-
|
|
|
if self.current and self.editing():
|
|
|
-
|
|
|
-
|
|
|
- self.current.addPoint(self.current[0])
|
|
|
+
|
|
|
+ if len(self.current) < 4:
|
|
|
+ return
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ self.current[-1] = self.current[0]
|
|
|
self.finalise(ev)
|
|
|
|
|
|
def selectShape(self, point):
|