/// <summary> /// Handles cancellation of an editing command. /// </summary> /// <param name="cmd">The command that is being cancelled.</param> /// <returns>True if the command is one that was created by this update object.</returns> internal bool AbortCommand(CommandUI cmd) { // Return if the command wasn't started by this update. if (!Object.ReferenceEquals(cmd, m_Cmd)) { return(false); } // Delete the command. m_Cmd.Dispose(); m_Cmd = null; // Revert to the save point that was set when we started the command. // SS 27-MAR-2003 -- In the case of a command that was // invoked to fix a problem, DON'T undo. That has to // wait until the user clicks the Undo button that's // part of the m_Info dialog. // SS 06-MAR-2012 -- No longer relevant(?) //if (m_Problem==null) // Undo(); // Paint in our own way. Draw(); // Ensure info window is shown m_Info.OnAbortUpdate(); return(true); }