Commit 99b75a03 authored by Kristin Berry's avatar Kristin Berry
Browse files

Updated ControlNet::swap() to swap the new graph structure. Fixes problem with...

Updated ControlNet::swap() to swap the new graph structure. Fixes problem with qnet not displaying points
parent 8dd32578
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@ namespace Isis {
    p_modified = Application::DateTime();
  }


  ControlNet::ControlNet(const ControlNet &other) {

    nullify();
@@ -394,7 +393,6 @@ namespace Isis {
    // Make sure there is a node for every measure
    for (int i = 0; i < point->GetNumMeasures(); i++) {
      QString sn = point->GetMeasure(i)->GetCubeSerialNumber();

      // If the graph doesn't have the sn, add a node for it
      if (!m_vertexMap.contains(sn)) {
        Image newImage;
@@ -1820,6 +1818,8 @@ namespace Isis {
  void ControlNet::swap(ControlNet &other) {
    std::swap(points, other.points);
    std::swap(pointIds, other.pointIds);
    m_controlGraph.swap(other.m_controlGraph);
    std::swap(m_vertexMap, other.m_vertexMap);
    std::swap(m_mutex, other.m_mutex);
    std::swap(p_targetName, other.p_targetName);
    std::swap(p_networkId, other.p_networkId);
@@ -1843,9 +1843,7 @@ namespace Isis {
    while (i2.hasNext()) {
      i2.next().value()->parentNetwork = &other;
    }

    emit networkModified(ControlNet::Swapped);

  }


+1 −0
Original line number Diff line number Diff line
@@ -257,6 +257,7 @@ namespace Isis {
   *   @history 2018-07-06 Jesse Mapel - Modified addEdge and removeEdge to always emit a graph
   *                           modified signal if an edge is added or removed. Added graph
   *                           modified signal when a vertex is added.
   *   @history 2018-07-22 Kristin Berry - Updated swap to include the graph and vertex map.
   */
  class ControlNet : public QObject {
      Q_OBJECT