diff --git a/labelme/widgets/canvas.py b/labelme/widgets/canvas.py index a78f073d3..7ae3ae350 100644 --- a/labelme/widgets/canvas.py +++ b/labelme/widgets/canvas.py @@ -957,7 +957,7 @@ def keyPressEvent(self, ev): self.current = None self.drawingPolygon.emit(False) self.update() - elif key == QtCore.Qt.Key_Return and self.canCloseShape(): + elif key in (QtCore.Qt.Key_Return, QtCore.Qt.Key_Space) and self.canCloseShape(): self.finalise() elif modifiers == QtCore.Qt.AltModifier: self.snapping = False