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