From 4c3d527472bd69e303c9100a8aa1f0d5e0ec2bbf Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Fri, 13 Sep 2024 10:25:25 +0900 Subject: [PATCH] Fix group edit when text field is disabled --- labelme/widgets/label_dialog.py | 4 ++++ 1 file changed, 4 insertions(+) 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()