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

Method undo

Engine/source/gui/worldEditor/guiMissionArea.cpp:696–715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694//------------------------------------------------------------------------------
695
696void GuiMissionAreaUndoAction::undo()
697{
698 MissionArea *ma = NULL;
699 if ( !Sim::findObject( mObjId, ma ) )
700 return;
701
702 // Temporarily save the MissionArea's current data.
703 RectI area = ma->getArea();
704
705 // Restore the MissionArea properties saved in the UndoAction
706 ma->setArea( mArea );
707 ma->inspectPostApply();
708
709 // Now save the previous Mission data in this UndoAction
710 // since an undo action must become a redo action and vice-versa
711 mArea = area;
712
713 // Let the script get a chance at it.
714 Con::executef( mMissionAreaEditor, "onUndo" );
715}

Callers

nothing calls this directly

Calls 5

executefFunction · 0.85
getAreaMethod · 0.80
findObjectFunction · 0.50
setAreaMethod · 0.45
inspectPostApplyMethod · 0.45

Tested by

no test coverage detected