Commit 2e0be13d authored by Marjorie Hahn's avatar Marjorie Hahn
Browse files

Updated RemoveImagesWorkOrder to follow new WorkOrder standards.

parent 497d1ed1
Loading
Loading
Loading
Loading
+25 −3
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ namespace Isis {
   * @brief Determines if we can remove this ImageList
   *
   * @param ImageList *imageList
   * @return  @b bool True if  we can remove from project, False otherwise.
   * @return bool True if we can remove from project, False otherwise.
   */
  bool RemoveImagesWorkOrder::isExecutable(ImageList *images) {

@@ -71,7 +71,11 @@ namespace Isis {
  }



  /**
   * @description Set up the execution.
   *  
   * @return bool True if parent WordOrder can set up the execution.
   */
  bool RemoveImagesWorkOrder::setupExecution() {

    bool success = WorkOrder::setupExecution();
@@ -80,10 +84,28 @@ namespace Isis {
  }


  /**
   * @description Remove an item from the project directory.
   */
  void RemoveImagesWorkOrder::execute() {
    qDebug()<<"RemoveImagesWorkOrder::syncRedo  project()->directory()->model() = "<<project()->directory()->model();
    qDebug()<<"RemoveImagesWorkOrder::execute  project()->directory()->model() = "<<project()->directory()->model();
    ProjectItem *currentItem = project()->directory()->model()->currentItem();
    project()->directory()->model()->removeItem(currentItem);
//  project()->removeImages(imageList());
  }


  /**
   * @description This method returns false because this WorkOrder is not undoable.
   * 
   * @see WorkOrder::isUndoable()
   * 
   * @return bool Returns false because this WorkOrder is not undoable.
   */
  bool RemoveImagesWorkOrder::isUndoable() {
    
    return false;
  }
}

+5 −1
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ namespace Isis {
   * @author 2016-07-28 Tracie Sucharski
   * 
   * @internal 
   *   @history 2017-04-07 Marjorie Hahn - Updated method names and documentation 
   *                           to match new work order design.
   *
   *   @history 2017-04-16 J Bonn - Updated to new workorder design #4764.
   */
  class RemoveImagesWorkOrder : public WorkOrder {
@@ -49,6 +52,7 @@ namespace Isis {
      virtual bool isExecutable(ImageList *images);

      bool setupExecution();
      bool isUndoable();

    protected:
      void execute();