MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / undo

Method undo

Engine/source/Verve/VPath/VPathEditor.cpp:1757–1783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1755//-----------------------------------------------------------------------------
1756
1757void VPathEditor::VPathEditorEditPathAction::undo( void )
1758{
1759 const MatrixF oldTransform = mTransform;
1760 const MatrixF newTransform = mPath->getTransform();
1761
1762 // Apply Old Values.
1763 mEditor->setPathTransform( oldTransform );
1764
1765 // The ol' Switcheroo.
1766 mTransform = newTransform;
1767
1768 // Update Selection.
1769 mEditor->updateSelection();
1770
1771 if ( mPath == mEditor->mSelection.Path )
1772 {
1773 // Arg Buffer.
1774 char buffer[32];
1775 dSprintf( buffer, sizeof( buffer ), "%d", mPath->getId() );
1776
1777 // Callback.
1778 Con::executef( mEditor, "onUpdatePath", buffer );
1779 }
1780
1781 // Set World Editor Dirty.
1782 mEditor->setWorldEditorDirty();
1783}
1784
1785void VPathEditor::VPathEditorEditPathAction::redo( void )
1786{

Callers

nothing calls this directly

Calls 15

dSprintfFunction · 0.85
executefFunction · 0.85
getIdMethod · 0.65
getTransformMethod · 0.45
setPathTransformMethod · 0.45
updateSelectionMethod · 0.45
setWorldEditorDirtyMethod · 0.45
getNodeMethod · 0.45
setNodePositionMethod · 0.45
setNodeRotationMethod · 0.45
setNodeWeightMethod · 0.45

Tested by

no test coverage detected