/// <summary> /// Pop an action from the doneActions stack and exeucutes it. Returns false if there was no action on the stack to undo. /// </summary> public bool Undo() { bool ret = false; if (model.DoneActions.Count > 0) { DuplicateAction action = model.DoneActions.Pop(); action.Undo(); if (action.Successful) { model.UndoneActions.Push(action); } ret = true; } model.NotifyPropertyChanged(nameof(model.EnableRedoButton)); model.NotifyPropertyChanged(nameof(model.EnableUndoButton)); return(ret); }