correctly handling the nestedTable for undo (but removing and adding
rows in proper QT way is still TODO)