提交 ccd08a79 编写于 作者: M Martijn Buijs 提交者: Kentaro Wada

Fix flake8 issues

上级 6132dc7a
......@@ -309,7 +309,8 @@ class MainWindow(QtWidgets.QMainWindow, WindowMixin):
zoomActions=zoomActions,
fileMenuActions=(open, opendir, save, saveAs, close, quit),
beginner=(), advanced=(),
editMenu=(edit, copy, delete, None, undoLastPoint, None, color1, color2),
editMenu=(edit, copy, delete, None, undoLastPoint,
None, color1, color2),
beginnerContext=(create, edit, copy, delete, undoLastPoint),
advancedContext=(
createMode, editMode, edit, copy,
......@@ -1057,7 +1058,7 @@ class MainWindow(QtWidgets.QMainWindow, WindowMixin):
if self.noShapes():
for action in self.actions.onShapesPresent:
action.setEnabled(False)
def undoLastPoint(self):
self.canvas.undoLastPoint()
......
......@@ -538,7 +538,7 @@ class Canvas(QtWidgets.QWidget):
self.current.setOpen()
self.line.points = [self.current[-1], self.current[0]]
self.drawingPolygon.emit(True)
def undoLastPoint(self):
if self.current and not self.current.isClosed():
self.current.popPoint()
......@@ -547,7 +547,7 @@ class Canvas(QtWidgets.QWidget):
else:
self.current = None
self.drawingPolygon.emit(False)
self.repaint()
self.repaint()
def loadPixmap(self, pixmap):
self.pixmap = pixmap
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册