mirror of https://gitlab.com/pamhyr/pamhyr2
Network: Minor change.
parent
ddf5941288
commit
a7945eea9a
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue