Implemented script-level undo/redo (currently hidden in UI)

This commit is contained in:
Ben Wallis
2017-12-07 18:14:47 +00:00
parent fee2a4dd99
commit d84b17ced3
36 changed files with 888 additions and 384 deletions

View File

@@ -28,8 +28,7 @@ namespace Filtration.ObjectModel.Commands
public void ExecuteCommand(ICommand command)
{
command.Execute();
var undoableCommand = command as IUndoableCommand;
if (undoableCommand != null)
if (command is IUndoableCommand undoableCommand)
{
_undoCommandStack.Push(undoableCommand);
_redoCommandStack.Clear();