new fix_2

pull/7044/head
whjdark 2022-07-29 16:55:06 +08:00
parent c60c7f137f
commit 31bf92c2cf
1 changed files with 4 additions and 2 deletions

View File

@ -1099,8 +1099,10 @@ class MainWindow(QMainWindow):
shape.paintIdx = self.displayIndexOption.isChecked() shape.paintIdx = self.displayIndexOption.isChecked()
item = HashableQListWidgetItem(shape.label) item = HashableQListWidgetItem(shape.label)
item.setFlags(item.flags() | Qt.ItemIsUserCheckable) # current difficult checkbox is disenble
item.setCheckState(Qt.Unchecked) if shape.difficult else item.setCheckState(Qt.Checked) # item.setFlags(item.flags() | Qt.ItemIsUserCheckable)
# item.setCheckState(Qt.Unchecked) if shape.difficult else item.setCheckState(Qt.Checked)
# Checked means difficult is False # Checked means difficult is False
# item.setBackground(generateColorByText(shape.label)) # item.setBackground(generateColorByText(shape.label))
self.itemsToShapes[item] = shape self.itemsToShapes[item] = shape