Commit 88df84c7 authored by Tracie Sucharski's avatar Tracie Sucharski
Browse files

Added documentation to the WorkOrder and Project class.

parent a5daa70f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1628,8 +1628,9 @@ namespace Isis {
        }
        // All other work orders go onto the undo stack, unless specifically told not to
        else if (workOrder->onUndoStack()) {
          // All other work orders go onto the undo stack, unless specifically told not to
          m_undoStack.push(workOrder); // This calls redo for us
          // This calls WorkOrder::redo for us through Qt's QUndoStack::push method, redo is only
          // implemented in the base class.  Child work orders do not implement redo. 
          m_undoStack.push(workOrder); 
        }

        // Clean up deleted work orders (the m_undoStack.push() can delete work orders)
+1 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ namespace Isis {
   *   @history 2017-02-06 Tracie Sucharski - When adding a work order to the project, check the
   *                           work order to determine if it should be put on the QUndoStack.
   *                           Fixes #4598.
   *   @history 2017-03-30 Tracie Sucharski - Cleaned up some documentation regarding last change. 
   */
  class Project : public QObject {
    Q_OBJECT
+1 −1
Original line number Diff line number Diff line
@@ -910,7 +910,7 @@ namespace Isis {

  /**
   * @description Starts (or enqueues) a redo. This should not be re-implemented by children.
   * TODO:  (Then why is it declared virtual?)
   * 
   */
  void WorkOrder::redo() {
    if (!isInStableState()) {
+23 −4
Original line number Diff line number Diff line
@@ -66,6 +66,22 @@ namespace Isis {
   *   OR between syncUndo(), asyncUndo() and postSyncUndo(). Other forms of state will cause the
   *   work order to not function properly when saved/restored from disk.
   *  
   *   The order of execution for work orders is:
   *   execute() - GUI thread, can ask user for input*
   *   syncRedo() - GUI thread, should not prompt the user for input
   *   asyncRedo() - Pooled thread
   *   postSyncRedo() - GUI thread
   *
   *   syncUndo() - GUI thread, always called after redo finishes
   *   asyncUndo() - Pooled thread
   *   postSyncUndo() - GUI thread
   *
   *   syncRedo() - GUI thread
   *   asyncRedo() - Pooled thread
   *   postSyncRedo() - GUI thread
   *
   *   and so on...
   *
   * @author 2012-??-?? Steven Lambright and Stuart Sides
   *
   * @internal
@@ -250,7 +266,10 @@ namespace Isis {

      void setCreatesCleanState(bool createsCleanState);
      /** 
       * This determines whether the work order is put on the QUndoStack.
       *  Sets whether this work order is put on the QUndoStack.
          If this is set to false, all of the work needs to go in the execute method.  The syncRedo
          and asyncRedo methods will never be called since the work order is not pushed onto the
          undo stack which is where the WorkOrder::redo method is called.
         */
      void setUndoRedo(bool undoRedo);
      void setModifiesDiskState(bool changesProjectOnDisk);