LCS Complete

This commit is contained in:
Youcef AOUAD committed 2024-06-20 11:59:57 +02:00
1 parent 510bee115b
commit 02c597d109
11 files changed
+157 -261

No files matched your search

@@ -45,13 +45,13 @@ class SetDataCommand(QUndoCommand):
if self._column == 0:
self._data._data[self._index] = (self._old,self._data._data[self._index][1])
else:
self._data._data[self._index] = (self._data._data[self._index][1], self._old)
self._data._data[self._index] = (self._data._data[self._index][0], self._old)
def redo(self):
if self._column == 0:
self._data._data[self._index] = (self._new,self._data._data[self._index][1])
else:
self._data._data[self._index] = (self._data._data[self._index][1], self._new)
self._data._data[self._index] = (self._data._data[self._index][0], self._new)
class AddCommand(QUndoCommand):
def __init__(self, data, index):
@@ -84,7 +84,7 @@ class DelCommand(QUndoCommand):
def undo(self):
for row, el in self._bc:
self._data.insert(row, el)
self._data._data.insert(row, el)
def redo(self):
for row in self._rows: