--- a/eric7/Debugger/WatchPointModel.py Mon Jun 20 11:04:28 2022 +0200 +++ b/eric7/Debugger/WatchPointModel.py Mon Jun 20 13:25:14 2022 +0200 @@ -12,6 +12,7 @@ from PyQt6.QtCore import pyqtSignal, Qt, QAbstractItemModel, QModelIndex +# TODO: change column numbers to class attributes class WatchPointModel(QAbstractItemModel): """ Class implementing a custom model for watch expressions. @@ -87,7 +88,10 @@ role == Qt.ItemDataRole.CheckStateRole and index.column() in [2, 3] ): - return self.watchpoints[index.row()][index.column()] + if self.watchpoints[index.row()][index.column()]: + return Qt.CheckState.Checked + else: + return Qt.CheckState.Unchecked if ( role == Qt.ItemDataRole.ToolTipRole and @@ -225,7 +229,7 @@ row = index.row() index1 = self.createIndex(row, 0, self.watchpoints[row]) index2 = self.createIndex( - row, len(self.watchpoints[row]), self.watchpoints[row]) + row, len(self.watchpoints[row]) - 1, self.watchpoints[row]) self.dataAboutToBeChanged.emit(index1, index2) self.watchpoints[row] = [cond, special] + list(properties) self.dataChanged.emit(index1, index2)