Commit fed7050e authored by Tracie Sucharski's avatar Tracie Sucharski
Browse files

Fixed problem with IPCE code which caused segfault in qmos. Added conditional...

Fixed problem with IPCE code which caused segfault in qmos.  Added conditional code to determine if cnetsuite is the executable.  Fixes #4063.

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



  void MosaicControlNetTool::displayChangedControlPoint(QString changedControlPoint) {
    //qDebug()<<"MosaicControlNetTool::displayChangedControlPoint";
    m_controlNetGraphics->clearControlPointGraphicsItem(changedControlPoint);
@@ -466,14 +465,12 @@ namespace Isis {
  }



  void MosaicControlNetTool::displayNewControlPoint(QString newControlPoint) {
    //qDebug()<<"MosaicControlNetTool::displayNewControlPoint";
    m_controlNetGraphics->buildChildren();
  }



/*
 * remove deleted point from display
 * removeControlPointFromDisplay
@@ -641,8 +638,10 @@ namespace Isis {
        //  However for cnetsuite, if we want to follow the Directory/WorkOrder design paradigm this 
        //  is probably not the best place to implement this.
        //  Also, once we figure out how to determine the active control network, this will change.
        if (getWidget()->directory()) {
          getWidget()->directory()->addControlPointEditor(m_controlNet, netFile);
        }
      }
      catch(IException &e) {
        QString message = "Invalid control network.\n";
        message += e.toString();
@@ -681,6 +680,9 @@ namespace Isis {

    if (!isActive() || !m_controlNet) return;

    // If not IPCE, return, qmos does not use this code
    if (!getWidget()->directory()) return;

    ControlPoint *cp = NULL;

    //  Modify closest control point
+8 −1
Original line number Diff line number Diff line
@@ -17,6 +17,9 @@ namespace Isis {

  /**
   * //TODO: Remove debug printout & comment 
   * //         2016-08-25 Tracie Sucharski - Checking Directory pointer for IPCE code not ideal. 
   *                           Is there a better design?  This might go away if we emit signals,
   *                           which only IPCE classes would connect to.
   * @brief Handles Control Net displays
   *
   * @ingroup Visualization Tools
@@ -42,6 +45,10 @@ namespace Isis {
   *                           and fromMovementColorSourceString(). Fixes #479.
   *   @history 2013-01-31 Steven Lambright - Removed some debugging statements that were left
   *                           around from the last change. Fixes #1459.
   *   @history 2016-08-25 Tracie Sucharski - Fixed IPCE code which caused qmos to segfault.  Added
   *                           checks for the existence of a Directory pointer in the openControlNet
   *                           and mouseButtonRelease methods.  If Directory point is NULL, IPCE
   *                           code not executed.  Fixes #4063.
   */
  class MosaicControlNetTool : public MosaicTool {
      Q_OBJECT