/* UndoLogEntryCommand.as */ package gov.va.med.edp.command { import com.adobe.cairngorm.commands.ICommand; import com.adobe.cairngorm.control.CairngormEvent; import gov.va.med.edp.model.TrackingModelLocator; public class UndoLogEntryCommand implements ICommand { private var model:TrackingModelLocator = TrackingModelLocator.getInstance(); public function execute(event:CairngormEvent):void { if (!model.logEdit.dirty) return; model.logEdit.undo.copyTo(model.logEdit.entry); model.logEdit.message = ""; model.logEdit.dirty = false; model.entryRemoveReady(); //from AutoSave: model.editorViewState = TrackingModelLocator.VIEW_EDIT_FORM; } } }