Commit 2a10d248 authored by Ken Edmundson's avatar Ken Edmundson
Browse files

fixes to re-display cneteditor windows and bug in TargetInfoWidget and BundleSettingsDialog

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@6746 41f8697f-d340-4b68-9986-7bafba869bb8
parent 0b8084ef
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -59,7 +59,12 @@ namespace Isis {


  bool CnetEditorViewWorkOrder::isExecutable(QList<Control *> controls) {
    return (controls.count() == 1);
//  return (controls.count() == 1);

    if (controls.count() >= 1)
      return true;
    else
      return false;
  }


@@ -82,9 +87,11 @@ namespace Isis {


  void CnetEditorViewWorkOrder::syncRedo() {
    project()->directory()->addCnetEditorView(controlList().first());
    for (int i = 0; i < controlList().size(); i++) {
      //project()->directory()->addCnetEditorView(controlList().first());
      project()->directory()->addCnetEditorView(controlList().at(i));
    }
  }


  void CnetEditorViewWorkOrder::syncUndo() {
    delete project()->directory()->cnetEditorViews().last();
+13 −9
Original line number Diff line number Diff line
@@ -141,14 +141,18 @@ namespace Isis {
    // directory. This run time directory will contain the output files for
    // this run (along with correlation matrix and serialized bundle
    // information files).
    QString runTime = Isis::iTime::CurrentLocalTime().toLatin1().data();
    QDir cwd = m_project->addBundleSolutionInfoFolder(runTime);
    QString path = cwd.absolutePath() + "/";
    m_bundleSettings->setOutputFiles(path, true, true, true);
       
    m_bundleAdjust = new BundleAdjust(m_bundleSettings,
                                           *m_selectedControl,
                                           m_project->images(),

// KLE - test commenting out 2016-05-30
//    QString runTime = Isis::iTime::CurrentLocalTime().toLatin1().data();
//    QDir cwd = m_project->addBundleSolutionInfoFolder(runTime);
//    QString path = cwd.absolutePath() + "/";
//    m_bundleSettings->setOutputFiles(path, true, true, true);
       
//     m_bundleAdjust = new BundleAdjust(m_bundleSettings,
//                                            *m_selectedControl,
//                                            m_project->images(),
//                                            false);
    m_bundleAdjust = new BundleAdjust(m_bundleSettings, *m_selectedControl, m_project->images(),
                                      false);

       m_bundleAdjust->moveToThread(bundleThread);
@@ -348,7 +352,7 @@ namespace Isis {
  }

  // TODO: Give user the option to keep or throw away the bundle. Even if the bundle converged it
  //       coulde still be worthless.
  //       could still be worthless.
  }  
}

+63 −0
Original line number Diff line number Diff line
@@ -907,16 +907,24 @@ namespace Isis {

    TargetBodyQsp target = m_project->targetBodies().at(index);
    if (target) {

      if (target->frameType() != Isis::SpiceRotation::BPC) {
        std::vector<Angle> raCoefs = target->poleRaCoefs();
        std::vector<Angle> decCoefs = target->poleDecCoefs();
        std::vector<Angle> pmCoefs = target->pmCoefs();

        showTargetAngleWidgets();

        m_ui->rightAscensionLineEdit->setText(toString(raCoefs[0].degrees()));
        m_ui->rightAscensionVelocityLineEdit->setText(toString(raCoefs[1].degrees()));
        m_ui->declinationLineEdit->setText(toString(decCoefs[0].degrees()));
        m_ui->declinationVelocityLineEdit->setText(toString(decCoefs[1].degrees()));
        m_ui->primeMeridianOffsetLineEdit->setText(toString(pmCoefs[0].degrees()));
        m_ui->spinRateLineEdit->setText(toString(pmCoefs[1].degrees()));
      }
      else {
        hideTargetAngleWidgets();
      }

      m_ui->aRadiusLineEdit->setText(toString(target->radiusA().kilometers()));
      //m_ui->aRadiusSigmaLineEdit->setText(toString(target->sigmaRadiusA().kilometers()));
@@ -1050,4 +1058,59 @@ namespace Isis {
    }
    update();
  }

  void JigsawSetupDialog::showTargetAngleWidgets() {
    m_ui->rightAscensionLineEdit->show();
    m_ui->rightAscensionVelocityLineEdit->show();
    m_ui->declinationLineEdit->show();
    m_ui->declinationVelocityLineEdit->show();
    m_ui->primeMeridianOffsetLineEdit->show();
    m_ui->spinRateLineEdit->show();

    m_ui->rightAscensionSigmaLineEdit->show();
    m_ui->rightAscensionVelocitySigmaLineEdit->show();
    m_ui->declinationSigmaLineEdit->show();
    m_ui->declinationVelocitySigmaLineEdit->show();
    m_ui->primeMeridianOffsetSigmaLineEdit->show();
    m_ui->spinRateSigmaLineEdit->show();

    m_ui->poleRaCheckBox->show();
    m_ui->poleRaVelocityCheckBox->show();
    m_ui->poleDecCheckBox->show();
    m_ui->poleDecVelocityCheckBox->show();
    m_ui->primeMeridianOffsetCheckBox->show();
    m_ui->spinRateCheckBox->show();

    m_ui->parameterLabel->show();
    m_ui->valueLabel->show();
    m_ui->sigmaLabel->show();
  }


  void JigsawSetupDialog::hideTargetAngleWidgets() {
    m_ui->rightAscensionLineEdit->hide();
    m_ui->rightAscensionVelocityLineEdit->hide();
    m_ui->declinationLineEdit->hide();
    m_ui->declinationVelocityLineEdit->hide();
    m_ui->primeMeridianOffsetLineEdit->hide();
    m_ui->spinRateLineEdit->hide();

    m_ui->rightAscensionSigmaLineEdit->hide();
    m_ui->rightAscensionVelocitySigmaLineEdit->hide();
    m_ui->declinationSigmaLineEdit->hide();
    m_ui->declinationVelocitySigmaLineEdit->hide();
    m_ui->primeMeridianOffsetSigmaLineEdit->hide();
    m_ui->spinRateSigmaLineEdit->hide();

    m_ui->poleRaCheckBox->hide();
    m_ui->poleRaVelocityCheckBox->hide();
    m_ui->poleDecCheckBox->hide();
    m_ui->poleDecVelocityCheckBox->hide();
    m_ui->primeMeridianOffsetCheckBox->hide();
    m_ui->spinRateCheckBox->hide();

    m_ui->parameterLabel->hide();
    m_ui->valueLabel->hide();
    m_ui->sigmaLabel->hide();
  }
}
+2 −0
Original line number Diff line number Diff line
@@ -87,6 +87,8 @@ namespace Isis {
    private:
    void makeReadOnly()    ;
    void fillFromSettings(BundleSettingsQsp settings);
    void showTargetAngleWidgets();
    void hideTargetAngleWidgets();

  private:
    Ui::JigsawSetupDialog *m_ui;
+3 −0
Original line number Diff line number Diff line
@@ -669,6 +669,9 @@ namespace Isis {
    QDir bundleDir = addBundleSolutionInfoFolder(runTime); //???
                                                           // save solution information to a file
    QString bundleFileName = bundleDir.absolutePath() + "/" + "BundleSolutionInfo.hdf";

    bundleSolutionInfo->bundleSettings()->setOutputFiles(bundleDir.absolutePath() + "/",
                                                         true, true, true);
    bundleSolutionInfo->createH5File(FileName(bundleFileName));

    loadBundleSolutionInfo(bundleSolutionInfo);
Loading