Commit 0abe9274 authored by Cole Neubauer's avatar Cole Neubauer
Browse files

Fixed issue where ipce was opening a project directly on the command line and...

Fixed issue where ipce was opening a project directly on the command line and bipassing work order Fixes #5171

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@8284 41f8697f-d340-4b68-9986-7bafba869bb8
parent aec0352a
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@
#include "Project.h"
#include "ProjectItemModel.h"
#include "ProjectItemTreeView.h"
#include "OpenProjectWorkOrder.h"
#include "SensorInfoWidget.h"
#include "TargetInfoWidget.h"

@@ -101,13 +102,6 @@ namespace Isis {
          "Could not create Directory.", _FILEINFO_);
    }

    QStringList args = QCoreApplication::arguments();
/**
    if (args.count() == 2) {
      qDebug() << args.last();
      m_directory->project()->open(args.last());
    }
*/
    m_projectDock = new QDockWidget("Project", this, Qt::SubWindow);
    m_projectDock->setObjectName("projectDock");
    m_projectDock->setFeatures(QDockWidget::DockWidgetMovable |
@@ -197,8 +191,11 @@ namespace Isis {
    centralWidget->setTabsMovable(true);
    centralWidget->setTabsClosable(true);

    QStringList args = QCoreApplication::arguments();

    if (args.count() == 2) {
      m_directory->project()->open(args.last());
      OpenProjectWorkOrder *workorder = new OpenProjectWorkOrder(m_directory->project());
      workorder->execute();
    }

    // ken testing  If this is used, we will not need to call updateMenuActions() or updateToolBar()
+5 −3
Original line number Diff line number Diff line
@@ -101,6 +101,8 @@ namespace Isis {
   *   @history 2017-08-09 Marjorie Hahn - Hard-coded the size of the icons in the toolbar to
   *                           temporarily fix the shift in size when switching between views
   *                           until docked widgets are implemented. Fixes #5084.
   *   @history 2017-10-06 Cole Neubauer - Made the open from command line use the WorkOrder
   *                           Fixes #5171
   *   @history 2017-11-02 Tyler Wilson - Added the ability to read/write settings for recent
   *                            projects.  Also re-implemented the functionality for loading
   *                            recent projects in IPCE.  Fixes #4492.
+10 −2
Original line number Diff line number Diff line
@@ -146,7 +146,15 @@ namespace Isis {
   *
   */
  void OpenProjectWorkOrder::execute() {
    QStringList args = QCoreApplication::arguments();
    if (args.count() == 2) {
      project()->open(args.last());
    }
    else {
      project()->open(m_projectName);
    }

    project()->setClean(true);

  }
}
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,8 @@ namespace Isis {
   *                           method.
   *   @history 2017-07-12 Cole Neubauer - In setupExecution added functionallity to open a new
   *                           project while there is a project currently open. Fixes #4969
   *   @history 2017-09-06 Cole Neubauer - Changed execute so it can be used to open a project
   *                           from the command line Fixes #5174
   */
  class OpenProjectWorkOrder : public WorkOrder {
      Q_OBJECT
+1 −0
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ namespace Isis {
    if (!destination.isEmpty()) {
      project()->save(destination);
      project()->open(destination);
      project()->setClean(true);
    }
  }
}
Loading