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

Method removeAction

Engine/source/util/undo.cpp:258–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258void UndoManager::removeAction(UndoAction *action, bool noDelete)
259{
260 Vector<UndoAction*>::iterator itr = mUndoStack.begin();
261 while (itr != mUndoStack.end())
262 {
263 if ((*itr) == action)
264 {
265 UndoAction* deleteAction = *itr;
266 mUndoStack.erase(itr);
267 doRemove( deleteAction, noDelete );
268 return;
269 }
270 itr++;
271 }
272
273 itr = mRedoStack.begin();
274 while (itr != mRedoStack.end())
275 {
276 if ((*itr) == action)
277 {
278 UndoAction* deleteAction = *itr;
279 mRedoStack.erase(itr);
280 doRemove( deleteAction, noDelete );
281 return;
282 }
283 itr++;
284 }
285}
286
287void UndoManager::doRemove( UndoAction* action, bool noDelete )
288{

Callers 2

onRemoveMethod · 0.45
~UndoActionMethod · 0.45

Calls 3

beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected