Commit c1522bf6 authored by Kaitlyn Lee's avatar Kaitlyn Lee
Browse files

Moved connection to Directory for encapsulation.

parent e1f4e53a
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -906,6 +906,10 @@ namespace Isis {


      connect(result, SIGNAL(windowChangeEvent(bool)),
      connect(result, SIGNAL(windowChangeEvent(bool)),
              m_project, SLOT(setClean(bool)));
              m_project, SLOT(setClean(bool)));

      // Recolors the save net button in controlPointEditView to black after the cnets are saved.
      connect(m_project, SIGNAL(cnetSaved(bool)),
              result->controlPointEditWidget(), SLOT(colorizeSaveNetButton(bool)));
    }
    }


    return controlPointEditView();
    return controlPointEditView();
+2 −1
Original line number Original line Diff line number Diff line
@@ -270,7 +270,8 @@ namespace Isis {
   *   @history 2018-07-12 Kaitlyn Lee - Changed connection between cnetModified() and project's
   *   @history 2018-07-12 Kaitlyn Lee - Changed connection between cnetModified() and project's
   *                           activeControlModified() to cnetModified() and project's renamed
   *                           activeControlModified() to cnetModified() and project's renamed
   *                           method cnetModified(). Fixes #5414.
   *                           method cnetModified(). Fixes #5414.
   *   @history 2018-07-13 Kaitlyn Lee - Added signal activeControlModified() and changed
   *   @history 2018-07-13 Kaitlyn Lee - Added connection to color the save net button to black when
   *                           a cnet is saved. Added signal activeControlModified() and changed
   *                           connections that alerted views to redraw themselves when a cnet was
   *                           connections that alerted views to redraw themselves when a cnet was
   *                           modified. Now, views will only be redrawn when
   *                           modified. Now, views will only be redrawn when
   *                           activeControlModified() is signaled, instead of cnetModified(). This
   *                           activeControlModified() is signaled, instead of cnetModified(). This
+1 −7
Original line number Original line Diff line number Diff line
@@ -48,8 +48,6 @@
#include "BundleSettings.h"
#include "BundleSettings.h"
#include "BundleSolutionInfo.h"
#include "BundleSolutionInfo.h"
#include "Camera.h"
#include "Camera.h"
#include "ControlPointEditView.h"
#include "ControlPointEditWidget.h"
#include "Control.h"
#include "Control.h"
#include "ControlList.h"
#include "ControlList.h"
#include "ControlNet.h"
#include "ControlNet.h"
@@ -2363,11 +2361,7 @@ namespace Isis {
        }
        }
      }
      }
      save(m_projectRoot->absolutePath(), false);
      save(m_projectRoot->absolutePath(), false);

      emit cnetSaved(true);
      // Recolors the save net button in controlPointEditView to black after the cnets are saved.
      if (m_directory->controlPointEditView()) {
        m_directory->controlPointEditView()->controlPointEditWidget()->colorizeSaveNetButton(true);
      }
    }
    }


    return saveDialogCompleted;
    return saveDialogCompleted;
+12 −4
Original line number Original line Diff line number Diff line
@@ -287,10 +287,10 @@ namespace Isis {
   *                          being modified. This stopped any changes made to a nonactive cnet from
   *                          being modified. This stopped any changes made to a nonactive cnet from
   *                          being saved and caused the active to be saved if a nonactive was
   *                          being saved and caused the active to be saved if a nonactive was
   *                          edited, even if it was not. Fixes #5414.
   *                          edited, even if it was not. Fixes #5414.
   *   @history 2018-07-13 Kaitlyn Lee - Added a call to colorizeSaveNetButton() in save() so that
   *   @history 2018-07-13 Kaitlyn Lee - Added singal cnetSaved() so that the save net button goes
   *                          the save net button goes back to black after the cnet is saved. Added
   *                          back to black after the cnet is saved. Added signal
   *                          signal activeControlModified() that is emitted in cnetModified() and
   *                          activeControlModified() that is emitted in cnetModified() and is
   *                          is connected to Directory. This stops views from being redrawn when
   *                          connected to Directory. This stops views from being redrawn when
   *                          any cnet is modified. Only the active should cause this. Fixes #5396.
   *                          any cnet is modified. Only the active should cause this. Fixes #5396.
   */
   */
  class Project : public QObject {
  class Project : public QObject {
@@ -527,10 +527,12 @@ namespace Isis {
       * receivers: Control, BundleSolutionInfo, Image, TargetBody
       * receivers: Control, BundleSolutionInfo, Image, TargetBody
       */
       */
      void projectRelocated(Project *);
      void projectRelocated(Project *);

      /**
      /**
       * Emitted when work order starts
       * Emitted when work order starts
       */
       */
      void workOrderStarting(WorkOrder *);
      void workOrderStarting(WorkOrder *);

      /**
      /**
       * Emitted when work order ends
       * Emitted when work order ends
       */
       */
@@ -546,6 +548,12 @@ namespace Isis {
       */
       */
      void activeControlModified();
      void activeControlModified();


      /**
       * Emmited in save() when the project is being saved
       * Connected to Directory so that ControlPointEditWidget can recolor the save net button.
       */
      void cnetSaved(bool value);

    public slots:
    public slots:
      void open(QString);
      void open(QString);
      void setClean(bool value);
      void setClean(bool value);