bool   sgCScene::EndUndoGroup()

 

Description:

Finishes saving commands into the scene history which was started by the StartUndoGroup function.

All the commands to work with the scene and its objects will be saved to the undo group between calling the StartUndoGroup and EndUndoGroup functions, i.e. this group will be undone using the Undo function.

 

 

Arguments:

No arguments.

 

Returned value:

Returns false if the function fails and true otherwise.

 

 

Example:

 

sgLine*      line1 = sgCreateLine(0.0, 0.0, 0.0, 2.0, 3.0, 5.0);

sgLine*      line2 = line1->Clone();

sgGetScene()->StartUndoGroup();

sgGetScene()->AttachObject(line1);

sgGetScene()->AttachObject(line2);

sgGetScene()->EndUndoGroup();

sgGetScene()->Undo();

 

 

See also:

GetScene StartUndoGroup   IsUndoStackEmpty IsRedoStackEmpty Undo Redo