|
|
@ -896,9 +896,10 @@ def changeBlock(blockId, newParametersDict): |
|
|
|
"""for example "name" or "minimumInTicks" """ |
|
|
|
track, block = session.data.blockById(blockId) |
|
|
|
moveFunction = _createLambdaMoveToForCurrentPosition() |
|
|
|
oldData = block.getDataAsDict() |
|
|
|
def registeredUndoFunction(): |
|
|
|
moveFunction() |
|
|
|
changeBlock(blockId, block.getDataAsDict()) |
|
|
|
changeBlock(blockId, oldData) |
|
|
|
session.history.register(registeredUndoFunction, descriptionString = "change block") |
|
|
|
block.putDataFromDict(newParametersDict) |
|
|
|
callbacks._updateTrack(id(track)) |
|
|
|