Commit c3e91e37 authored by Kristin Berry's avatar Kristin Berry
Browse files

Merge with upstream

parents 16ff03c9 3a42d984
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@

#include <QList>
#include <QStringList>
#include <QPoint>

#include "Application.h"
#include "Camera.h"
+10 −0
Original line number Diff line number Diff line
@@ -231,6 +231,16 @@ namespace Isis {
        MeasureLocked
      };


      /**
       * @brief Control Measure Modification Types
       *
       *  This enum is designed to represent the different types of modifications that can be
       *  made to a ControlMeasure.
       *
       * IgnoredModified means that the Control Measure had it's IGNORED flag changed.
       *
       */
      enum ModType {
        IgnoredModified
      };
+25 −11
Original line number Diff line number Diff line
@@ -129,10 +129,29 @@ namespace Isis {
  }


  /**
   * This method is a wrapper to emit the measureModified() signal and is called whenever a change
   * is made to a Control Measure.
   *
   * @param measure The ControlMeasure* that was modified.
   * @param type The ControlMeasure::ModType indicating which modification occured.
   * @param oldValue The oldValue before the change.
   * @param newValue The new value that the change incorporated.
   */
  void ControlNet::emitMeasureModified(ControlMeasure *measure, ControlMeasure::ModType type, QVariant oldValue, QVariant newValue) {
    emit measureModified(measure, type, oldValue, newValue);
  }


  /**
   * This method is a wrapper to emit the pointModified() signal and is called whenever a change
   * is made to a Control Point.
   *
   * @param point The ControlPoint* that was modified.
   * @param type The ControlPoint::ModType indicating which modification occured.
   * @param oldValue The oldValue before the change.
   * @param newValue The new value that the change incorporated.
   */
  void ControlNet::emitPointModified(ControlPoint *point, ControlPoint::ModType type, QVariant oldValue, QVariant newValue) {
    emit pointModified(point, type, oldValue, newValue);
  }
@@ -692,8 +711,7 @@ namespace Isis {

  /**
   * Updates the node for this measure's serial number to
   * reflect the deletion.  If this is the only measure left in the containing
   * node, then the node is deleted as well.
   * reflect the deletion.
   *
   * @param measure The measure removed from the network.
   */
@@ -715,14 +733,6 @@ namespace Isis {
    // for the old graph.
    m_controlGraph[m_vertexMap[serial]].measures.remove(measure->Parent());


// We decided in a meeting that we do not want to delete the node when all measures are removed.
    // If this caused the node to be empty, then delete the node.
//    if (m_controlGraph[m_vertexMap[serial]].measures.size() <= 0) {
//      boost::clear_vertex(m_vertexMap[serial], m_controlGraph);
//      boost::remove_vertex(m_vertexMap[serial], m_controlGraph);
//      m_vertexMap.remove(serial);
//    }
  }


@@ -836,6 +846,10 @@ namespace Isis {
  }



  /**
   * This method is a wrapper to emit the networkStructureModified() signal.
   */
  void ControlNet::emitNetworkStructureModified() {
    emit networkStructureModified();
  }
+9 −0
Original line number Diff line number Diff line
@@ -259,6 +259,15 @@ namespace Isis {

    public:

      /**
       *  @brief Control Point Modification Types
       *
       *  This enum is designed to represent the different types of modifications that can be
       *  made to a ControlNet.
       *
       *  Swapped means the network was swapped with another network (ControlNet::Swap(ControlNet &other)).
       *  GraphModified means that a vertice or edge was added/removed from the graph..
       */
      enum ModType {
        Swapped,
        GraphModified
+11 −5
Original line number Diff line number Diff line
@@ -56,8 +56,10 @@ namespace Isis {

    m_islandList = m_controlNet->GetSerialConnections();

    m_numPoints = 0;
    m_numPointsIgnored = 0;
    m_numPointsLocked = 0;
    m_numMeasures = m_controlNet->GetNumMeasures();

    m_pointMeasureCounts.clear();
    m_imageMeasureCounts.clear();
@@ -117,7 +119,9 @@ namespace Isis {
   *  @param point The ControlPoint being added to the network.
   */
  void ControlNetVitals::addPoint(ControlPoint *point) {

    emitHistoryEntry("Control Point Added", point->GetId(), "", "");
    m_numPoints++;

    if (point->IsIgnored()) {
      m_numPointsIgnored++;
@@ -271,6 +275,7 @@ namespace Isis {
  void ControlNetVitals::deletePoint(ControlPoint *point) {

    emitHistoryEntry("Control Point Deleted", point->GetId(), "", "");
    m_numPoints--;

    if (point->IsIgnored()) {
      m_numPointsIgnored--;
@@ -305,6 +310,8 @@ namespace Isis {
   */
  void ControlNetVitals::addMeasure(ControlMeasure *measure) {
    emitHistoryEntry("Control Measure Added", measure->GetCubeSerialNumber(), "", "");
    m_numMeasures++;


    ControlPoint *point = measure->Parent();
    if (point) {
@@ -390,7 +397,7 @@ namespace Isis {
  void ControlNetVitals::deleteMeasure(ControlMeasure *measure) {

    emitHistoryEntry("Control Measure Deleted", measure->GetCubeSerialNumber(), "", "");

    m_numMeasures--;

    ControlPoint *point = measure->Parent();
    if (point) {
@@ -499,13 +506,12 @@ namespace Isis {


  /**
   *  This method is designed to return the number of points in the observed Control Network.
   *  It is a wrapper for the ControlNet::GetNumPoints() call of the observed Control Network.
   *  This method is designed to return the number of points in the Control Network.
   *
   *  @return The number of points in the Control Network.
   */
  int ControlNetVitals::numPoints() {
    return m_controlNet->GetNumPoints();
    return m_numPoints;
  }


@@ -599,7 +605,7 @@ namespace Isis {
   *  @return The number of measures in the Control Network.
   */
  int ControlNetVitals::numMeasures() {
    return m_controlNet->GetNumMeasures();
    return m_numMeasures;
  }


Loading