From 7b33e2bce95057cd607c3203cc3db1026a2afddf Mon Sep 17 00:00:00 2001 From: "arnaud.morvan@camptocamp.com" <arnaud.morvan@camptocamp.com> Date: Tue, 7 Nov 2023 18:46:00 +0100 Subject: [PATCH] Fix super().data(index, role) crash QGIS on Windows --- PreCourlis/widgets/points_table_model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PreCourlis/widgets/points_table_model.py b/PreCourlis/widgets/points_table_model.py index f30a119..56f41b7 100644 --- a/PreCourlis/widgets/points_table_model.py +++ b/PreCourlis/widgets/points_table_model.py @@ -89,11 +89,11 @@ class PointsTableModel(QtCore.QAbstractTableModel): column = self.columns[index.column()] if column in ("abs_lat", "topo_bath"): - return super().data(index, role) + return None if column == "zfond": if self.valid_section_values[0][index.row()]: - return super().data(index, role) + return None else: return QtGui.QBrush(QtGui.QColor(255, 0, 0)) @@ -101,7 +101,7 @@ class PointsTableModel(QtCore.QAbstractTableModel): if self.valid_section_values[index.column() - self._NB_EXTRA_COLS + 1][ index.row() ]: - return super().data(index, role) + return None else: return QtGui.QBrush(QtGui.QColor(255, 0, 0)) -- GitLab