_setBlockData(block,newData)#handles undo and callbacks
#if len(block.linkedContentBlocks) == 1: return #This will not work because block is still the old one. unlink replaces with a standalone copy but we keep the original for undo.
withsession.history.sequence("unlink block"):
duplicateBlock(blockId)
deleteBlock(blockId)#original one
callbacks._historyChanged()
#Does not work properly:
#newData = block.getUnlinkedData()
#assert newData
#_setBlockData(block, newData) #handles undo and callbacks
#deprecated
def_setBlockData(block,newData):
"""DEPRECATED. This did not work. The linked blocks were not reduced.