Skip to content

Commit

Permalink
Fix group edit when text field is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Sep 20, 2024
1 parent ecc83c2 commit 478417f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions labelme/widgets/label_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 478417f

Please sign in to comment.