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

Method redo

Engine/source/gui/worldEditor/undoActions.cpp:96–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void MECreateUndoAction::redo()
97{
98 for ( S32 i=0; i < mObjects.size(); i++ )
99 {
100 const ObjectState &state = mObjects[i];
101
102 // Create the object.
103 SimObject::setForcedId(state.id); // Restore the object's Id
104 SimObject *object = state.memento.restore();
105 if ( !object )
106 continue;
107
108 // Now restore its group.
109 SimGroup *group;
110 if ( Sim::findObject( state.groupId, group ) )
111 group->addObject( object );
112 }
113
114 Con::executef( this, "onRedone" );
115}
116
117
118IMPLEMENT_CONOBJECT( MEDeleteUndoAction );

Callers

nothing calls this directly

Calls 6

executefFunction · 0.85
findObjectFunction · 0.50
sizeMethod · 0.45
restoreMethod · 0.45
addObjectMethod · 0.45
deleteObjectMethod · 0.45

Tested by

no test coverage detected