Explorar o código

Fix AttributeError while label editing

Kentaro Wada %!s(int64=6) %!d(string=hai) anos
pai
achega
2114231696
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      labelme/app.py

+ 1 - 1
labelme/app.py

@@ -817,7 +817,7 @@ class MainWindow(QtWidgets.QMainWindow, WindowMixin):
         if not self.canvas.editing():
             return
         item = item if item else self.currentItem()
-        text = self.labelDialog.popUp(item.text())
+        text = self.labelDialog.popUp(item.text() if item else None)
         if text is None:
             return
         if not self.validateLabel(text):