Removed mixed tabs and spaces

This commit is contained in:
Kah Wei 2022-10-01 22:58:19 +08:00
parent 5e07383cf1
commit 15c39d7028
2 changed files with 18 additions and 18 deletions

View File

@ -175,10 +175,10 @@ namespace SHADE
/// Performs an undo for script inspector changes if it exists.
/// </summary>
void UndoScriptInspectorChanges() const;
/// <summary>
/// Performs a redo for script inspector changes if it exists.
/// </summary>
void RedoScriptInspectorChanges() const;
/// <summary>
/// Performs a redo for script inspector changes if it exists.
/// </summary>
void RedoScriptInspectorChanges() const;
/*-----------------------------------------------------------------------------*/
/* Static Utility Functions */
@ -251,8 +251,8 @@ namespace SHADE
CsScriptSerialiseYamlFuncPtr csScriptDeserialiseYaml = nullptr;
// - Editor
CsScriptEditorFuncPtr csEditorRenderScripts = nullptr;
CsFuncPtr csEditorUndo = nullptr;
CsFuncPtr csEditorRedo = nullptr;
CsFuncPtr csEditorUndo = nullptr;
CsFuncPtr csEditorRedo = nullptr;
/*-----------------------------------------------------------------------------*/
/* Event Handler Functions */

View File

@ -22,15 +22,15 @@ of DigiPen Institute of Technology is prohibited.
namespace SHADE
{
bool UndoRedoStack::UndoActionPresent::get()
{
return commandStack->Count > 0 && latestActionIndex >= 0;
}
bool UndoRedoStack::UndoActionPresent::get()
{
return commandStack->Count > 0 && latestActionIndex >= 0;
}
bool UndoRedoStack::RedoActionPresent::get()
{
bool UndoRedoStack::RedoActionPresent::get()
{
return latestActionIndex >= 0 && latestActionIndex < commandStack->Count - 1;
}
}
void UndoRedoStack::Add(Command command)
{
@ -47,7 +47,7 @@ namespace SHADE
latestActionIndex = commandStack->Count - 1;
}
void UndoRedoStack::Undo()
void UndoRedoStack::Undo()
{
if (!UndoActionPresent)
return;
@ -60,10 +60,10 @@ namespace SHADE
void UndoRedoStack::Redo()
{
if (!RedoActionPresent)
return;
return;
Command cmd = commandStack[latestActionIndex];
cmd.Field->SetValue(cmd.Object, cmd.NewData);
++latestActionIndex;
Command cmd = commandStack[latestActionIndex];
cmd.Field->SetValue(cmd.Object, cmd.NewData);
++latestActionIndex;
}
}