Просмотр исходного кода

Support createMode="ai_polygon" in self.double_click

Kentaro Wada 2 лет назад
Родитель
Сommit
8613cfcf4c
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      labelme/widgets/canvas.py

+ 3 - 1
labelme/widgets/canvas.py

@@ -547,7 +547,9 @@ class Canvas(QtWidgets.QWidget):
         if self.double_click != "close":
             return
 
-        if self.createMode == "polygon" and self.canCloseShape():
+        if (
+            self.createMode == "polygon" and self.canCloseShape()
+        ) or self.createMode == "ai_polygon":
             self.finalise()
 
     def selectShapes(self, shapes):