Commit bcb4d5c0 authored by Cole Neubauer's avatar Cole Neubauer
Browse files

Views will no longer be on history Fixes #4715

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7900 41f8697f-d340-4b68-9986-7bafba869bb8
parent 850f260b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ namespace Isis {
  BundleObservationViewWorkOrder::BundleObservationViewWorkOrder(Project *project) :
      WorkOrder(project) {
    m_isUndoable = false;
    m_isSavedToHistory = false;
    QAction::setText(tr("&View..."));
    QUndoCommand::setText(tr("View..."));
  }
@@ -112,7 +113,6 @@ namespace Isis {
   *
   */
  void BundleObservationViewWorkOrder::execute() {

    //ProjectItem * selectedItem = project()->directory()->model()->selectedItems();
    project()->directory()->addBundleObservationView(fileItem());
    project()->setClean(false);
+2 −3
Original line number Diff line number Diff line
@@ -33,12 +33,11 @@ namespace Isis {
   * Project.  This WorkOrder adds a BundleObservationView to the project.  This runs synchronously
   * and is not undoable.
   *
   * @todo Some thought should probably be given to whether we actually want view WorkOrders to be
   * saved in the history.
   *
   * @author 2017-05-04 Tracie Sucharski
   *
   * @internal
   *   @history 2017-07-24 Cole Neuabuer - Set m_isSavedToHistory to false on construction
   *                           Fixes #4715
   *  @history 2017-07-25 Cole Neubauer - Added project()->setClean call #4969
   */
  class BundleObservationViewWorkOrder : public WorkOrder {
+2 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ namespace Isis {
      WorkOrder(project) {
    QAction::setText(tr("&Close Project"));
    QUndoCommand::setText(tr("Close Project"));

    m_isSavedToHistory = false;
    setCreatesCleanState(true);
  }

@@ -87,6 +87,7 @@ namespace Isis {
   */
  bool CloseProjectWorkOrder::setupExecution() {
    bool success = WorkOrder::setupExecution();

    if (success && !project()->isClean() && project()->isOpen() ) {
      QMessageBox *box = new QMessageBox(QMessageBox::NoIcon,
              QString("Current Project Has Unsaved Changes"),
+3 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ namespace Isis {
   *                          Fixes #2146.
   *   @history 2017-07-18 Cole Neubauer - Finished implementing Close Project work order.
   *                          Fixes #4521
   *   @history 2017-07-24 Cole Neuabuer - Set m_isSavedToHistory to false on construction
   *                           Fixes #4715
   */
  class CloseProjectWorkOrder : public WorkOrder {
      Q_OBJECT
@@ -52,6 +54,7 @@ namespace Isis {
      bool setupExecution();
      void execute();


    signals:

    private:
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ namespace Isis {
  CnetEditorViewWorkOrder::CnetEditorViewWorkOrder(Project *project) :
      WorkOrder(project) {
    QAction::setText(tr("View &Network..."));
    m_isSavedToHistory = false;
  }


@@ -87,6 +88,7 @@ namespace Isis {


  void CnetEditorViewWorkOrder::execute() {

    for (int i = 0; i < controlList()->size(); i++) {
      //project()->directory()->addCnetEditorView(controlList().first());
      project()->directory()->addCnetEditorView(controlList()->at(i));
Loading