Unverified Commit 4ed73890 authored by ihumphrey's avatar ihumphrey Committed by GitHub
Browse files

Merge branch 'dev' into release

parents 5c17bb5c 426df74a
Loading
Loading
Loading
Loading
+77 −70
Original line number Diff line number Diff line
@@ -504,6 +504,7 @@ namespace Isis {
        int g = lab.groups() - 1;
        if (g >= 0 && lab.group(g).isNamed("UserParameters") ) {
          Isis::PvlGroup &up = lab.group(g);
          QString commandline(p_progName + " ");
          for (int k = 0; k < up.keywords(); k++) {
            QString keyword = up[k].name();

@@ -529,9 +530,15 @@ namespace Isis {
              }
            }

            if (!matchesDefault)
            if (!matchesDefault) {
              PutAsString(keyword, values);
              commandline += keyword + "=";
              foreach(QString val, values) {
                commandline += val + " ";
              }
            }
          }
          std::cout << commandline << std::endl;
          return;
        }

+31 −28
Original line number Diff line number Diff line
@@ -146,6 +146,9 @@ namespace Isis {
   *                           Added lacking [at]throws documentation to UserInterface.cpp.
   *   @history 2016-04-05 Jesse Mapel - Changed bad histroy file error message to reflect that
   *                           the history file could be for a different application. Fixes #2366
   *   @history 2018-04-20 Adam Goins - Modified loadHistory() to print out the last command
   *                           so that users can see the actual command that the -last arg loads.
   *                           Fixes #4779.
   *
   */

+5 −2
Original line number Diff line number Diff line
@@ -225,8 +225,11 @@ int main(int argc, char *argv[]) {
    /**** EXITING ****/
    // Connect the viewport's close signal to the file tool's exit method
    // Added 2008-12-04 by Jeannie Walldren
    QObject::connect(vw , SIGNAL(closeWindow()),
                     ftool, SLOT(exit()));
    // Added 2018-04-24 by Adam Goins - Added in optional parameters to the closeWindow() signal
    //                         And the exit() slot so that the window's closeEvent can be handled
    //                         Appropriately. Fixes #4146.
    QObject::connect(vw , SIGNAL(closeWindow(QCloseEvent *)),
                     ftool, SLOT(exit(QCloseEvent *)));
    //-----------------------------------------------------------------

    vw->show();
+15 −6
Original line number Diff line number Diff line
@@ -219,11 +219,19 @@ namespace Isis {
    emit newControlNetwork(controlNet());
  }


  /**
   *  Exit the program
   *
   *  @internal
   *  @history 2018-04-24 Adam Goins - Added QCloseEvent optional parameter to
   *                          set the CloseEvent triggered by an onwindowclose
   *                          to ignore the event if the 'cancel' option was selected
   *                          after clicking the close button of the viewport window.
   *                          This fixes an issue where clicking the close button and then clicking
   *                          'cancel' from the QMessageBox would close the window but keep the
   *                          application running. Fixes #4146.
   */
  void QnetFileTool::exit() {
  void QnetFileTool::exit(QCloseEvent *event) {
    //  If control net has been changed , prompt for user to save
    if (m_isDirty) {
      int resp = QMessageBox::warning((QWidget *)parent(), "QnetTool",
@@ -236,14 +244,15 @@ namespace Isis {
        saveAs();
      }
      if (resp == QMessageBox::Cancel) {
        if (event) {
          event->setAccepted(false);
        }
        return;
      }
    }
    qApp->quit();
  }



    /**
   *  Save control network with given file
   *  @internal
+12 −4
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
 */

#include "FileTool.h"
#include <QCloseEvent>

class QString;
class QWidget;
@@ -79,6 +80,13 @@ namespace Isis {
   *   @history 2016-04-22 Jeannie Backer - Modified to use cube labels to set
   *                           ControlNet's target instead of the TargetName.
   *                           References #3892
   *  @history 2018-04-24 Adam Goins - Added QCloseEvent optional parameter to slot "exit()" to
   *                          set the CloseEvent triggered by an onwindowclose
   *                          to ignore the event if the 'cancel' option was selected
   *                          after clicking the close button of the viewport window.
   *                          This fixes an issue where clicking the close button and then clicking
   *                          'cancel' from the QMessageBox would close the window but keep the
   *                          application running. Fixes #4146.
   *
   */

@@ -103,7 +111,7 @@ namespace Isis {

    public slots:
      virtual void open();
      virtual void exit();
      virtual void exit(QCloseEvent *event = NULL);
      virtual void save();
      virtual void saveAs();
      void loadPointImages(ControlPoint *point);
Loading