Commit 3fef233d authored by Tracie Sucharski's avatar Tracie Sucharski
Browse files

Fix serialization of Ipce's FootprintView so that ImageFileList is also saved...

Fix serialization of Ipce's FootprintView so that ImageFileList is also saved to project.  Fixes #5422.
parent 125031b1
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
@@ -217,15 +217,6 @@ namespace Isis {
    return output;
  }

  /**
   * This method pushes a new XmlHandler into the parser stack.
   *
   * @param xmlReader This is the parser stack.
   */
  void ImageFileListWidget::load(XmlStackedHandlerReader *xmlReader) {
    xmlReader->pushContentHandler(new XmlHandler(this));
  }

  /**
   * This method calls ImageTreeWidget::actions() which sets up a QAction
   * that sets a default for the file list columns and returns a QList of
@@ -611,6 +602,17 @@ namespace Isis {
    return result;
  }


  /**
   * This method pushes a new XmlHandler into the parser stack.
   *
   * @param xmlReader This is the parser stack.
   */
  void ImageFileListWidget::load(XmlStackedHandlerReader *xmlReader) {
    xmlReader->pushContentHandler(new XmlHandler(this));
  }


  /**
   * This method saves the FootprintColumns in the project and the settings associated
   * with every column.
@@ -621,10 +623,11 @@ namespace Isis {
   */
  void ImageFileListWidget::save(QXmlStreamWriter &stream, Project *project,
                                 FileName newProjectRoot) const {

    stream.writeStartElement("imageFileList");

    // Write QSettings
    stream.writeStartElement("widgetGeometry");
//  stream.writeStartElement("widgetGeometry");
//  QString geom = saveGeometry();
//  //qDebug()<<"ImageFileListWidget::save   geometry = "<<geom;
//  stream.writeAttribute("value", saveGeometry());
@@ -672,6 +675,7 @@ namespace Isis {
    stream.writeEndElement();
  }


  /**
   * This method saves the QTreeWidgetItem and the settings associated with the QTreeWidgetItem
   * to the stream.
@@ -758,7 +762,7 @@ namespace Isis {
  bool ImageFileListWidget::XmlHandler::startElement(const QString &namespaceURI,
      const QString &localName, const QString &qName, const QXmlAttributes &atts) {
    bool result = XmlStackedHandler::startElement(namespaceURI, localName, qName, atts);
  /*  //tjw

    if (result) {

//    if (localName == "geometry") {
@@ -826,7 +830,6 @@ namespace Isis {
      }

    }
    */

    return result;
  }
@@ -905,6 +908,4 @@ namespace Isis {
      }
    }
  }


}
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ namespace Isis {
   *   @history 2017-07-18 Cole Neubauer - Added removeImages slot to be able to remove from the
   *                           ImageFileList in IPCE Fixes #4996
   *   @history 2017-08-22 Cole Neuabuer - Added ability to search ImageFileListWidget. Fixes #1556
   *   @history 2018-05-15 Tracie Sucharski - Fixed xml serialization for Ipce project saves.  Fixes
   *                            #5422.
   */
  class ImageFileListWidget : public QWidget {
      Q_OBJECT