mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Pollutants: Fix setters from undo/redo commands on edition
This commit is contained in:
1 parent
f86cd4602c
commit
eed2ce4243
1 file changed
+3
-3
@@ -34,14 +34,14 @@ class SetNameCommand(QUndoCommand):
|
|||||||
|
|
||||||
self._pollutants_lst = pollutants_lst
|
self._pollutants_lst = pollutants_lst
|
||||||
self._index = index
|
self._index = index
|
||||||
self._old = self._pollutants_lst.get(self._index).name
|
self._old = self._pollutants_lst[self._index].name
|
||||||
self._new = str(new_value)
|
self._new = str(new_value)
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
self._pollutants_lst.get(self._index).name = self._old
|
self._pollutants_lst[self._index].name = self._old
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
self._pollutants_lst.get(self._index).name = self._new
|
self._pollutants_lst[self._index].name = self._new
|
||||||
|
|
||||||
|
|
||||||
class SetEnabledCommand(QUndoCommand):
|
class SetEnabledCommand(QUndoCommand):
|
||||||
|
|||||||
Reference in new issue
Block a user