Skip to content

Commit

Permalink
Make label editing less strict
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Feb 12, 2019
1 parent 8aba57d commit c3cc420
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion labelme/widgets/label_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ def popUp(self, text=None, move=True):
self.edit.setSelection(0, len(text))
items = self.labelList.findItems(text, QtCore.Qt.MatchFixedString)
if items:
assert len(items) == 1
if len(items) != 1:
logger.warning("Label list has duplicate '{}'".format(text))
self.labelList.setCurrentItem(items[0])
row = self.labelList.row(items[0])
self.edit.completer().setCurrentRow(row)
Expand Down

0 comments on commit c3cc420

Please sign in to comment.