Sfoglia il codice sorgente

Remove MainWindow.undoLastPoint for simplicity

Kentaro Wada 7 anni fa
parent
commit
56625cf445
1 ha cambiato i file con 1 aggiunte e 4 eliminazioni
  1. 1 4
      labelme/app.py

+ 1 - 4
labelme/app.py

@@ -219,7 +219,7 @@ class MainWindow(QtWidgets.QMainWindow, WindowMixin):
         copy = action('&Duplicate\nPolygon', self.copySelectedShape, 'Ctrl+D',
         copy = action('&Duplicate\nPolygon', self.copySelectedShape, 'Ctrl+D',
                       'copy', 'Create a duplicate of the selected polygon',
                       'copy', 'Create a duplicate of the selected polygon',
                       enabled=False)
                       enabled=False)
-        undoLastPoint = action('Undo last point', self.undoLastPoint,
+        undoLastPoint = action('Undo last point', self.canvas.undoLastPoint,
                                ['Ctrl+Z', 'Backspace'], 'undoLastPoint',
                                ['Ctrl+Z', 'Backspace'], 'undoLastPoint',
                                'Undo last drawn point', enabled=False)
                                'Undo last drawn point', enabled=False)
 
 
@@ -1059,9 +1059,6 @@ class MainWindow(QtWidgets.QMainWindow, WindowMixin):
                 for action in self.actions.onShapesPresent:
                 for action in self.actions.onShapesPresent:
                     action.setEnabled(False)
                     action.setEnabled(False)
 
 
-    def undoLastPoint(self):
-        self.canvas.undoLastPoint()
-
     def chshapeLineColor(self):
     def chshapeLineColor(self):
         color = self.colorDialog.getColor(
         color = self.colorDialog.getColor(
             self.lineColor, 'Choose line color', default=DEFAULT_LINE_COLOR)
             self.lineColor, 'Choose line color', default=DEFAULT_LINE_COLOR)