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

PROG: In mouseButtonRelease method return if a control net has not been set.

parent c9516956
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -73,6 +73,8 @@ namespace Isis {
     QAction *action = new QAction(this);
     action->setIcon(QPixmap(toolIconDir()+"/HILLBLU_molecola.png"));
     action->setToolTip("Control Point Editor (T)");
     action->setStatusTip("If tool disabled, make sure you have a control net in your project and "
                          "it is set to the active control.");
     action->setShortcut(Qt::Key_T);

     //The object name is being set and used as a key to search with for this action in
@@ -99,16 +101,18 @@ namespace Isis {
    */
   void ControlNetTool::setControlNet(ControlNet *cnet) {
     m_controlNet = cnet;
    
     qDebug()<<"ControlNetTool::setControlNet";
     //  Cannot use Tool::cubeViewportList() because it does not properly return a NULL if viewports
     //  don't exist.
     if (workspace() && workspace()->cubeViewportList()) {
       qDebug()<<"ControlNetTool::setControlNet  before paintAllViewports";
       paintAllViewports();
     }
   }


   void ControlNetTool::loadNetwork() {
     qDebug()<<"ControlNetTool::loadNetwork control";
     setControlNet(m_directory->project()->activeControl()->controlNet());
   }

@@ -125,7 +129,7 @@ namespace Isis {
   */
  void ControlNetTool::mouseButtonRelease(QPoint p, Qt::MouseButton s) {
    MdiCubeViewport *cvp = cubeViewport();
    if (cvp  == NULL) return;
    if (m_controlNet == NULL || cvp  == NULL) return;

    // Determine if the cvp is a Shape
    //  Get all ShapeLists from Project
+2 −0
Original line number Diff line number Diff line
@@ -56,6 +56,8 @@ namespace Isis {
   *                           IpceTool.  References #5090.
   *   @history 2018-03-27 Tracie Sucharski - Redraw cube viewports when a new control net is
   *                           loaded.
   *   @history 2018-04-13 Tracie Sucharski - In mouseButtonRelease method return if a control net
   *                           has not been set.
   */
  class ControlNetTool : public Tool {
    Q_OBJECT