Commit 6ab0570e authored by Christopher Combs's avatar Christopher Combs
Browse files

Added Control Measure info to ControlMeasureEditWidget. Fixes #5067

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7963 41f8697f-d340-4b68-9986-7bafba869bb8
parent fdae9bac
Loading
Loading
Loading
Loading
+70 −52
Original line number Diff line number Diff line
@@ -177,6 +177,12 @@ namespace Isis {
      connect(addMeasure, SIGNAL(clicked()), this, SLOT(addMeasure()));
    }

    m_reloadPoint = new QPushButton("Reload Point");
    m_reloadPoint->setToolTip("Reload the control point.");
    m_reloadPoint->setWhatsThis("Reload the measures for the control point"
                            " in the Chip Viewports to its saved values.");
    connect(m_reloadPoint, SIGNAL(clicked()), this, SLOT(reloadPoint()));

    m_savePoint = new QPushButton ("Save Point");
    m_savePoint->setToolTip("Save the edit control point to the control "
                            "network.");
@@ -201,11 +207,11 @@ namespace Isis {
    if (m_addMeasuresButton) {
      saveMeasureLayout->addWidget(addMeasure);
    }
    else {
      saveMeasureLayout->addStretch();
    }

    saveMeasureLayout->addWidget(m_reloadPoint);
    saveMeasureLayout->addWidget(m_savePoint);
    saveMeasureLayout->addWidget(m_saveNet);
    saveMeasureLayout->insertStretch(-1);

    m_cnetFileNameLabel = new QLabel("Control Network: " + m_cnetFileName);
    m_cnetFileNameLabel->setToolTip("Name of opened control network file.");
@@ -523,6 +529,18 @@ namespace Isis {
  }


  /**
   * Set both chip viewports to their original measures for the control point
   *
   * @internal
   *   @history 2017-07-31 Christopher Combs - Original version
   */
  void ControlPointEditWidget::reloadPoint() {
    m_measureEditor->setLeftMeasure(m_leftMeasure, m_leftCube.data(), m_editPoint->GetId());
    m_measureEditor->setRightMeasure(m_rightMeasure, m_rightCube.data(), m_editPoint->GetId());
  }


  /**
   * Set the serial number list
   *
+7 −3
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@ namespace Isis {
   *   @history 2017-08-02 Tracie Sucharski - Added methods to return the current editPoint and
   *                           current editPoint Id.  Removed measure table methods. Fixes #5007,
   *                           #5008.
   *   @history 2017-08-09 Christopher Combs - Added QPushButton and slot for reloading a point's
   *                           measures in the ChipViewports. Fixes #5070.
   */
  class ControlPointEditWidget : public QWidget {
    Q_OBJECT
@@ -105,6 +107,7 @@ namespace Isis {

    private slots:
//    void enterWhatsThisMode();
      void reloadPoint();
      void saveNet();
//    void addMeasure();
//    void setPointType (int pointType);
@@ -183,6 +186,7 @@ namespace Isis {
      //! Pointer to control measure editor widget
      QPointer<ControlMeasureEditWidget> m_measureEditor;

      QPointer<QPushButton> m_reloadPoint; //!< Button to reload current point to saved measures
      QPointer<QPushButton> m_savePoint; //!< Button to save current point being edited
      QPalette m_saveDefaultPalette; //!< Default color pallet of the "Save Point" button