Explorar o código

Disallow label editing when in draw mode

This can prove confusing however.
Michael Pitidis %!s(int64=13) %!d(string=hai) anos
pai
achega
0b9d851481
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      labelme.py

+ 2 - 0
labelme.py

@@ -355,6 +355,8 @@ class MainWindow(QMainWindow, WindowMixin):
         self.menus.labelList.exec_(self.labelList.mapToGlobal(point))
 
     def editLabel(self, item=None):
+        if self.canvas.editing():
+            return
         item = item if item else self.currentItem()
         text = self.simpleLabelDialog.popUp(item.text())
         if text is not None: