Network: Minor change.

mesh
Pierre-Antoine Rouby 2023-06-09 09:51:20 +02:00
parent ddf5941288
commit a7945eea9a
1 changed files with 2 additions and 6 deletions

View File

@ -127,12 +127,10 @@ class GraphTableModel(QAbstractTableModel):
return self.rows[index.row()][self.headers[index.column()]]
def headerData(self, section, orientation, role):
if role == Qt.ItemDataRole.DisplayRole and orientation == Qt.Orientation.Horizontal:
if (role == Qt.ItemDataRole.DisplayRole and
orientation == Qt.Orientation.Horizontal):
return self.headers[section].capitalize()
# if role == Qt.ItemDataRole.DisplayRole and orientation == Qt.Orientation.Vertical:
# return section
return QVariant()
@pyqtSlot()
@ -150,7 +148,6 @@ class GraphTableModel(QAbstractTableModel):
node
)
)
# self.rows[index.row()][self.headers[index.column()]] = node
elif self.headers[index.column()] == "enable":
self._undo.push(
EnableEdgeCommand(
@ -165,7 +162,6 @@ class GraphTableModel(QAbstractTableModel):
value
)
)
# self.rows[index.row()][self.headers[index.column()]] = value
self.dataChanged.emit(index, index, [Qt.DisplayRole])
self.layoutChanged.emit()