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

Accidently removed the serial number composition in last checking and print...

Accidently removed the serial number composition in last checking and print error when initializing footprint fails.
parent 71cebabd
Loading
Loading
Loading
Loading
+24 −7
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@ namespace Isis {

    m_displayProperties = new ShapeDisplayProperties(FileName(m_fileName).name(), this);
    m_id = new QUuid(QUuid::createUuid());
    m_serialNumber = SerialNumber::Compose(m_fileName, true);

    m_radiusSource = ControlPoint::RadiusSource::None;

@@ -200,6 +201,7 @@ namespace Isis {
      initQuickFootprint();
    }
    catch (IException &e) {
      
    }
  }

@@ -675,7 +677,8 @@ namespace Isis {
          }
        }
      }
      catch (IException &) {
      catch (IException &e) {
        e.print();
      }
    }

@@ -734,7 +737,8 @@ namespace Isis {
            m_instrumentId = obj.findGroup("Instrument")["InstrumentId"][0];
        }
      }
      catch (IException &) {
      catch (IException &e) {
        e.print();
      }
    }
  }
@@ -796,7 +800,8 @@ namespace Isis {
            m_scale = obj.findGroup("Mapping")["Scale"];
        }
      }
      catch (IException &) {
      catch (IException &e) {
        e.print();
      }
    }
  }
@@ -845,6 +850,7 @@ namespace Isis {

    stream.writeAttribute("id", m_id->toString());
    stream.writeAttribute("fileName", FileName(m_fileName).name());
    stream.writeAttribute("serialNumber", m_serialNumber);

    QString type;
    if (m_shapeType == Unprojected) {
@@ -937,6 +943,7 @@ namespace Isis {
      if (localName == "shape") {
        QString id = atts.value("id");
        QString fileName = atts.value("fileName");
        m_shape->m_serialNumber = atts.value("serialNumber");

        if (!id.isEmpty()) {
          delete m_shape->m_id;
@@ -948,6 +955,10 @@ namespace Isis {
          m_shape->m_fileName = m_shapeFolder.expanded() + "/" + fileName;
        }

        if (m_shape->m_serialNumber.isEmpty()) {
          m_shape->m_serialNumber = SerialNumber::Compose(*m_shape->cube(), true);
        }

        m_shape->m_surfacePointSource =
          ControlPoint::StringToSurfacePointSource(atts.value("surfacePointSource"));
        m_shape->m_radiusSource =
@@ -1055,14 +1066,20 @@ namespace Isis {
        m_shape->m_footprint = PolygonTools::MakeMultiPolygon(
            wktReader.read(m_characters.toStdString()));
      }
      catch (IException &) {
      catch (IException &e) {
        e.print();
      }
    }
    else if (localName == "shape" && !m_shape->m_footprint) {
      try {
        QMutex mutex; 
        m_shape->initFootprint(&mutex);
        m_shape->closeCube();
      }
      catch (IException &e) {
        e.print();
      }
    }

    m_characters = "";
    return XmlStackedHandler::endElement(namespaceURI, localName, qName);