forked from IPKM/nmreval
added autophase; fixes T217
This commit is contained in:
@ -54,6 +54,21 @@ class PhaseCommand(QtWidgets.QUndoCommand):
|
||||
self.__data.apply('ph', self.__phase)
|
||||
|
||||
|
||||
class AutophaseCommand(QtWidgets.QUndoCommand):
|
||||
def __init__(self, data, pvt: float):
|
||||
super().__init__('Autophase')
|
||||
|
||||
self.__data = data
|
||||
self.__data_data = copy.deepcopy(data.data)
|
||||
self.__pvt = pvt
|
||||
|
||||
def undo(self):
|
||||
self.__data.data = copy.deepcopy(self.__data_data)
|
||||
|
||||
def redo(self):
|
||||
self.__data.apply('autoph', (self.__pvt,))
|
||||
|
||||
|
||||
class ShiftCommand(QtWidgets.QUndoCommand):
|
||||
def __init__(self, data, value, mode):
|
||||
super().__init__('Fourier')
|
||||
|
Reference in New Issue
Block a user