提交 c3cc4201 编写于 作者: K Kentaro Wada

Make label editing less strict

上级 8aba57d7
......@@ -138,7 +138,8 @@ class LabelDialog(QtWidgets.QDialog):
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册