Fixed an issue causing the selection count of checkable selection lists going negative. eric7

Wed, 15 Feb 2023 18:00:20 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 15 Feb 2023 18:00:20 +0100
branch
eric7
changeset 9768
e2b622afb5ff
parent 9767
2eed840795c0
child 9769
c6cda4cb81d5

Fixed an issue causing the selection count of checkable selection lists going negative.

src/eric7/EricWidgets/EricListSelectionDialog.py file | annotate | diff | comparison | revisions
src/eric7/MicroPython/Devices/CircuitPythonUpdater/ShowOutdatedDialog.py file | annotate | diff | comparison | revisions
src/eric7/MicroPython/ShowModulesDialog.py file | annotate | diff | comparison | revisions
--- a/src/eric7/EricWidgets/EricListSelectionDialog.py	Wed Feb 15 17:45:10 2023 +0100
+++ b/src/eric7/EricWidgets/EricListSelectionDialog.py	Wed Feb 15 18:00:20 2023 +0100
@@ -100,7 +100,7 @@
         if self.__isCheckBoxSelection:
             if itm.checkState() == Qt.CheckState.Checked:
                 self.__checkCount += 1
-            else:
+            elif self.__checkCount > 0:
                 self.__checkCount -= 1
             self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(
                 self.__checkCount > 0
--- a/src/eric7/MicroPython/Devices/CircuitPythonUpdater/ShowOutdatedDialog.py	Wed Feb 15 17:45:10 2023 +0100
+++ b/src/eric7/MicroPython/Devices/CircuitPythonUpdater/ShowOutdatedDialog.py	Wed Feb 15 18:00:20 2023 +0100
@@ -125,7 +125,7 @@
         if self.__selectionMode:
             if item.checkState(0) == Qt.CheckState.Checked:
                 self.__checkCount += 1
-            else:
+            elif self.__checkCount > 0:
                 self.__checkCount -= 1
 
             self.__checkCountUpdated()
--- a/src/eric7/MicroPython/ShowModulesDialog.py	Wed Feb 15 17:45:10 2023 +0100
+++ b/src/eric7/MicroPython/ShowModulesDialog.py	Wed Feb 15 18:00:20 2023 +0100
@@ -102,7 +102,7 @@
         if self.__selectionMode:
             if item.checkState() == Qt.CheckState.Checked:
                 self.__checkCount += 1
-            else:
+            elif self.__checkCount > 0:
                 self.__checkCount -= 1
 
             self.__checkCountUpdated()

eric ide

mercurial