Browse Source

Fix sideeffect of auto label increment.

taashi-s 6 years ago
parent
commit
66b90c03a6
1 changed files with 2 additions and 0 deletions
  1. 2 0
      labelme/app.py

+ 2 - 0
labelme/app.py

@@ -1084,6 +1084,8 @@ class MainWindow(QtWidgets.QMainWindow):
                 if instance_text != '':
                     text = instance_text
             text, flags = self.labelDialog.popUp(text)
+            if text is None:
+                self.labelDialog.edit.setText(previous_label)
 
         if text and not self.validateLabel(text):
             self.errorMessage('Invalid label',