| 694 | //------------------------------------------------------------------------------ |
| 695 | |
| 696 | void 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 | } |
nothing calls this directly
no test coverage detected