From 31bf92c2cfa33ce52ac61050740268087b86303a Mon Sep 17 00:00:00 2001 From: whjdark Date: Fri, 29 Jul 2022 16:55:06 +0800 Subject: [PATCH] new fix_2 --- PPOCRLabel/PPOCRLabel.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PPOCRLabel/PPOCRLabel.py b/PPOCRLabel/PPOCRLabel.py index 24982448..9e67f0cc 100644 --- a/PPOCRLabel/PPOCRLabel.py +++ b/PPOCRLabel/PPOCRLabel.py @@ -1099,8 +1099,10 @@ class MainWindow(QMainWindow): shape.paintIdx = self.displayIndexOption.isChecked() item = HashableQListWidgetItem(shape.label) - item.setFlags(item.flags() | Qt.ItemIsUserCheckable) - item.setCheckState(Qt.Unchecked) if shape.difficult else item.setCheckState(Qt.Checked) + # current difficult checkbox is disenble + # item.setFlags(item.flags() | Qt.ItemIsUserCheckable) + # item.setCheckState(Qt.Unchecked) if shape.difficult else item.setCheckState(Qt.Checked) + # Checked means difficult is False # item.setBackground(generateColorByText(shape.label)) self.itemsToShapes[item] = shape -- GitLab