Implemented script-level undo/redo (currently hidden in UI)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user