Add command distribution to undo/redo in Logic.executeCommand

Now undo/redo should work