Removed mixed tabs and spaces
This commit is contained in:
parent
5e07383cf1
commit
15c39d7028
|
@ -175,10 +175,10 @@ namespace SHADE
|
||||||
/// Performs an undo for script inspector changes if it exists.
|
/// Performs an undo for script inspector changes if it exists.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void UndoScriptInspectorChanges() const;
|
void UndoScriptInspectorChanges() const;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Performs a redo for script inspector changes if it exists.
|
/// Performs a redo for script inspector changes if it exists.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void RedoScriptInspectorChanges() const;
|
void RedoScriptInspectorChanges() const;
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
/* Static Utility Functions */
|
/* Static Utility Functions */
|
||||||
|
@ -251,8 +251,8 @@ namespace SHADE
|
||||||
CsScriptSerialiseYamlFuncPtr csScriptDeserialiseYaml = nullptr;
|
CsScriptSerialiseYamlFuncPtr csScriptDeserialiseYaml = nullptr;
|
||||||
// - Editor
|
// - Editor
|
||||||
CsScriptEditorFuncPtr csEditorRenderScripts = nullptr;
|
CsScriptEditorFuncPtr csEditorRenderScripts = nullptr;
|
||||||
CsFuncPtr csEditorUndo = nullptr;
|
CsFuncPtr csEditorUndo = nullptr;
|
||||||
CsFuncPtr csEditorRedo = nullptr;
|
CsFuncPtr csEditorRedo = nullptr;
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
/* Event Handler Functions */
|
/* Event Handler Functions */
|
||||||
|
|
|
@ -22,15 +22,15 @@ of DigiPen Institute of Technology is prohibited.
|
||||||
|
|
||||||
namespace SHADE
|
namespace SHADE
|
||||||
{
|
{
|
||||||
bool UndoRedoStack::UndoActionPresent::get()
|
bool UndoRedoStack::UndoActionPresent::get()
|
||||||
{
|
{
|
||||||
return commandStack->Count > 0 && latestActionIndex >= 0;
|
return commandStack->Count > 0 && latestActionIndex >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UndoRedoStack::RedoActionPresent::get()
|
bool UndoRedoStack::RedoActionPresent::get()
|
||||||
{
|
{
|
||||||
return latestActionIndex >= 0 && latestActionIndex < commandStack->Count - 1;
|
return latestActionIndex >= 0 && latestActionIndex < commandStack->Count - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UndoRedoStack::Add(Command command)
|
void UndoRedoStack::Add(Command command)
|
||||||
{
|
{
|
||||||
|
@ -47,7 +47,7 @@ namespace SHADE
|
||||||
latestActionIndex = commandStack->Count - 1;
|
latestActionIndex = commandStack->Count - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UndoRedoStack::Undo()
|
void UndoRedoStack::Undo()
|
||||||
{
|
{
|
||||||
if (!UndoActionPresent)
|
if (!UndoActionPresent)
|
||||||
return;
|
return;
|
||||||
|
@ -60,10 +60,10 @@ namespace SHADE
|
||||||
void UndoRedoStack::Redo()
|
void UndoRedoStack::Redo()
|
||||||
{
|
{
|
||||||
if (!RedoActionPresent)
|
if (!RedoActionPresent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Command cmd = commandStack[latestActionIndex];
|
Command cmd = commandStack[latestActionIndex];
|
||||||
cmd.Field->SetValue(cmd.Object, cmd.NewData);
|
cmd.Field->SetValue(cmd.Object, cmd.NewData);
|
||||||
++latestActionIndex;
|
++latestActionIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue