Explorar o código

Fixed edit error

When editing a label with an group ID and u delete it, labelme crashed:
Fixed error "TypeError: setData() takes no keyword arguments"
Deleting the keywords fixed this error
Jonas %!s(int64=5) %!d(string=hai) anos
pai
achega
9fdda01a4b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      labelme/app.py

+ 1 - 1
labelme/app.py

@@ -918,7 +918,7 @@ class MainWindow(QtWidgets.QMainWindow):
         self.setDirty()
         if not self.uniqLabelList.findItemsByLabel(shape.label):
             item = QtWidgets.QListWidgetItem()
-            item.setData(role=Qt.UserRole, value=shape.label)
+            item.setData(Qt.UserRole, shape.label)
             self.uniqLabelList.addItem(item)
 
     def fileSearchChanged(self):