提交 a3e6781b 编写于 作者: S Sergey Shilin 提交者: Kentaro Wada

Fixed a bug when application crashes on polygon deletion. Closes #556

上级 6eb1798a
......@@ -222,7 +222,6 @@ class Canvas(QtWidgets.QWidget):
return
# Polygon/Vertex moving.
self.movingShape = False
if QtCore.Qt.LeftButton & ev.buttons():
if self.selectedVertex():
self.boundedMoveVertex(pos)
......@@ -364,6 +363,7 @@ class Canvas(QtWidgets.QWidget):
self.repaint()
elif ev.button() == QtCore.Qt.LeftButton and self.selectedShapes:
self.overrideCursor(CURSOR_GRAB)
if self.movingShape and self.hShape:
index = self.shapes.index(self.hShape)
if (self.shapesBackups[-1][index].points !=
......@@ -371,6 +371,8 @@ class Canvas(QtWidgets.QWidget):
self.storeShapes()
self.shapeMoved.emit()
self.movingShape = False
def endMove(self, copy):
assert self.selectedShapes and self.selectedShapesCopy
assert len(self.selectedShapesCopy) == len(self.selectedShapes)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册