mirror of https://gitlab.com/pamhyr/pamhyr2
delete old references to pollutants in BoundaryConditionsAdisTS window
parent
b450796df5
commit
7c3de520d9
|
|
@ -43,7 +43,7 @@ from View.Tools.PamhyrTable import PamhyrTableModel
|
||||||
|
|
||||||
from View.BoundaryConditionsAdisTS.UndoCommand import (
|
from View.BoundaryConditionsAdisTS.UndoCommand import (
|
||||||
SetNodeCommand, SetTypeCommand,
|
SetNodeCommand, SetTypeCommand,
|
||||||
AddCommand, DelCommand, SetPolCommand
|
AddCommand, DelCommand
|
||||||
)
|
)
|
||||||
from View.BoundaryCondition.translate import BC_types
|
from View.BoundaryCondition.translate import BC_types
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,22 +62,6 @@ class SetTypeCommand(QUndoCommand):
|
||||||
self._bcs.get(self._index).type = self._new
|
self._bcs.get(self._index).type = self._new
|
||||||
|
|
||||||
|
|
||||||
class SetPolCommand(QUndoCommand):
|
|
||||||
def __init__(self, bcs, index, pollutant):
|
|
||||||
QUndoCommand.__init__(self)
|
|
||||||
|
|
||||||
self._bcs = bcs
|
|
||||||
self._index = index
|
|
||||||
self._old = self._bcs.get(self._index).pollutant
|
|
||||||
self._new = pollutant
|
|
||||||
|
|
||||||
def undo(self):
|
|
||||||
self._bcs.get(self._index).pollutant = self._old
|
|
||||||
|
|
||||||
def redo(self):
|
|
||||||
self._bcs.get(self._index).pollutant = self._new
|
|
||||||
|
|
||||||
|
|
||||||
class AddCommand(QUndoCommand):
|
class AddCommand(QUndoCommand):
|
||||||
def __init__(self, pollutant, bcs, index):
|
def __init__(self, pollutant, bcs, index):
|
||||||
QUndoCommand.__init__(self)
|
QUndoCommand.__init__(self)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue