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

Method popCompound

Engine/source/util/undo.cpp:487–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485//-----------------------------------------------------------------------------
486
487void UndoManager::popCompound( bool discard )
488{
489 AssertFatal( getCompoundStackDepth() > 0, "UndoManager::popCompound - no compound on stack!" );
490
491 CompoundUndoAction* undo = mCompoundStack.last();
492 mCompoundStack.pop_back();
493
494 if( discard || undo->getNumChildren() == 0 )
495 {
496 if( undo->isProperlyAdded() )
497 undo->deleteObject();
498 else
499 delete undo;
500 }
501 else
502 addAction( undo );
503}
504
505//-----------------------------------------------------------------------------
506DefineEngineMethod(UndoAction, addToManager, void, (const char * undoManager), (""), "action.addToManager([undoManager])")

Callers 1

undo.cppFile · 0.80

Calls 5

isProperlyAddedMethod · 0.80
lastMethod · 0.45
pop_backMethod · 0.45
getNumChildrenMethod · 0.45
deleteObjectMethod · 0.45

Tested by

no test coverage detected