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

Refactors imports to correctly undo what should and to close segfaults Fixes #5064 #4831

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7977 41f8697f-d340-4b68-9986-7bafba869bb8
parent d7ca3c00
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -32,7 +32,12 @@ namespace Isis {
    m_displayProperties = NULL;
    m_project = NULL;

    try {
      openControlNet();
    }
    catch (IException &e) {
      throw IException(e, IException::Programmer, "Error opening control net.", _FILEINFO_);
    }

    m_displayProperties
        = new ControlDisplayProperties(FileName(m_fileName).name(), this);
@@ -113,9 +118,6 @@ namespace Isis {
    delete m_id;
    m_id = NULL;

    delete m_project;
    m_project = NULL;

    //  Image is a "Qt" parent of display properties, so the Image QObject
    //    destructor will take care of deleting the display props. See call to
    //    DisplayProperties' constructor.
+2 −0
Original line number Diff line number Diff line
@@ -57,6 +57,8 @@ namespace Isis {
   *                           object needs to assign a mutex when the control net is opened and by
   *                           doing this internally we can Close control nets and not have to
   *                           track whether this step has happened Fixes #5026
   *   @history 2017-08-11 Cole Neuabuer - Added try catch throw to make it so importing an invalid
   *                           control net throws some type of error/warning Fixes #5064
   */
  class Control : public QObject {
    Q_OBJECT
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ namespace Isis {
    QAction::setText(tr("&Close Project"));
    QUndoCommand::setText(tr("Close Project"));
    m_isSavedToHistory = false;
    m_isUndoable = false;
    setCreatesCleanState(true);
  }

+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ namespace Isis {
   *                          Fixes #4960
   *   @history 2017-07-24 Cole Neuabuer - Set m_isSavedToHistory to false on construction
   *                           Fixes #4715
   *   @history 2017-08-11 Cole Neubauer - set isUndoable parent member variable
   *                          Fixes #5064
   */
  class CloseProjectWorkOrder : public WorkOrder {
      Q_OBJECT
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ namespace Isis {
      WorkOrder(project) {
    QAction::setText(tr("View &Network..."));
    m_isSavedToHistory = false;
    m_isUndoable = false;
  }


Loading