forked from IPKM/nmreval
more interactive edit
This commit is contained in:
@ -87,6 +87,21 @@ class ShiftCommand(QtWidgets.QUndoCommand):
|
||||
self.__data.apply('ls', self.__args)
|
||||
|
||||
|
||||
class EditCommand(QtWidgets.QUndoCommand):
|
||||
def __init__(self, data, *args):
|
||||
super().__init__('Edit signal')
|
||||
|
||||
self.__data = data
|
||||
self.__arguments = args
|
||||
self.__original = copy.deepcopy(self.__data.data)
|
||||
|
||||
def undo(self):
|
||||
self.__data.data = copy.deepcopy(self.__original)
|
||||
|
||||
def redo(self):
|
||||
self.__data.edit_signal(*self.__arguments)
|
||||
|
||||
|
||||
class NormCommand(QtWidgets.QUndoCommand):
|
||||
def __init__(self, data, mode):
|
||||
super().__init__('Normalize')
|
||||
|
Reference in New Issue
Block a user