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

Fix flake8 issues

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