Parcourir la source

Fix AttributeError while label editing

Kentaro Wada il y a 6 ans
Parent
commit
2114231696
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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):