diff --git a/labelme/widgets/label_dialog.py b/labelme/widgets/label_dialog.py index 1047a5e38..e6c33ba1d 100644 --- a/labelme/widgets/label_dialog.py +++ b/labelme/widgets/label_dialog.py @@ -134,6 +134,10 @@ def labelSelected(self, item): self.edit.setText(item.text()) def validate(self): + if not self.edit.isEnabled(): + self.accept() + return + text = self.edit.text() if hasattr(text, "strip"): text = text.strip()