Commit 8bc5c1f5 authored by Tyler Wilson's avatar Tyler Wilson
Browse files

Moved an if-block responsible for loading projects from the command line in...

Moved an if-block responsible for loading projects from the command line in the CNetSuiteMainWindow constructor from the start to the end.  Fixes #4488

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7219 41f8697f-d340-4b68-9986-7bafba869bb8
parent c84e0c40
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -74,14 +74,12 @@ namespace Isis {
    }

    QStringList args = QCoreApplication::arguments();

/**
    if (args.count() == 2) {    
//    connect(this, SIGNAL(openProjectFromCommandLine(QString)),
//            project, SLOT(open(QString)), Qt::QueuedConnection);
//    emit openProjectFromCommandLine(args.last());
      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 |
@@ -167,6 +165,11 @@ namespace Isis {
    // ken testing
    setActiveView(projectTreeView);
    // ken testing

    if (args.count() == 2) {
      qDebug() << args.last();
      m_directory->project()->open(args.last());
    }
  }


+5 −0
Original line number Diff line number Diff line
@@ -65,6 +65,11 @@ namespace Isis {
   *   @history 2016-10-20 Tracie Sucharski - Clean up included headers that are commented out,
   *                          updated for Qt5, comment call to saveState for window which caused
   *                          errors.  TODO:  Determine problem with saveState call.
   *  @history 2016-11-09  Tyler Wilson - Move a segment of code in the constructor from the beginning
   *                          to the end.  This code loads a project from the command line instead of the 
   *                          GUI, and it wasn't outputting warnings/errors to the warnings/error tab
   *                          when the project was loaded because it was being called before the GUI
   *                          was created.  Fixes #4488.  References #4526, ##4487.
   */
  class CNetSuiteMainWindow : public QMainWindow {
      Q_OBJECT