提交 7d5e4655 编写于 作者: K Kentaro Wada

Fix bug caused by unHighlight

上级 b1ed91af
...@@ -152,7 +152,6 @@ class Canvas(QtWidgets.QWidget): ...@@ -152,7 +152,6 @@ class Canvas(QtWidgets.QWidget):
if self.hShape: if self.hShape:
self.hShape.highlightClear() self.hShape.highlightClear()
self.update() self.update()
self.hVertex, self.hShape, self.hEdge = None, None, None
def selectedVertex(self): def selectedVertex(self):
return self.hVertex is not None return self.hVertex is not None
...@@ -276,13 +275,11 @@ class Canvas(QtWidgets.QWidget): ...@@ -276,13 +275,11 @@ class Canvas(QtWidgets.QWidget):
self.vertexSelected.emit(self.hVertex is not None) self.vertexSelected.emit(self.hVertex is not None)
def addPointToEdge(self): def addPointToEdge(self):
if (self.hShape is None and
self.hEdge is None and
self.prevMovePoint is None):
return
shape = self.hShape shape = self.hShape
index = self.hEdge index = self.hEdge
point = self.prevMovePoint point = self.prevMovePoint
if shape is None or index is None or point is None:
return
shape.insertPoint(index, point) shape.insertPoint(index, point)
shape.highlightVertex(index, shape.MOVE_VERTEX) shape.highlightVertex(index, shape.MOVE_VERTEX)
self.hShape = shape self.hShape = shape
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册