Commit 0b9dd601 authored by Kim Oyama's avatar Kim Oyama
Browse files

In qview, changed the character that is used as a token when parsing the list...

In qview, changed the character that is used as a token when parsing the list of file names used when the socket is already open. In SocetThread's run method, changed the token used to parse the input buffer from a space to the escape character (ascii #27). In ControlPointEdit's saveChips() method, added single quotes around the file names in case there are spaces or other special characters in them. In coreg, replaced the spaces in the point ID with underscores. Fixes #1551.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@5670 41f8697f-d340-4b68-9986-7bafba869bb8
parent cb24c2e0
Loading
Loading
Loading
Loading
+1 −1
Changes for isis/src/control/apps/coreg/coreg.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ void IsisMain() {
      }

      // Add the measures to a control point
      QString str = "Row " + toString(r) + " Column " + toString(c);
      QString str = "Row_" + toString(r) + "_Column_" + toString(c);
      ControlPoint * cp = new ControlPoint(str);
      cp->SetType(ControlPoint::Free);
      cp->Add(cmTrans);
+3 −0
Changes for isis/src/control/apps/coreg/coreg.xml: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -232,6 +232,9 @@
      Modified the documentation a bit and informed the user of the new
      qview-MatchTool that will now display the output network.
    </change>
    <change name="Kimberly Oyama" date="2013-12-30">
      Replaced the spaces in the point ID with underscores. References #1551.
    </change>
  </history>

  <groups>
+6 −3
Changes for isis/src/qisis/apps/qview/qview.cpp: 6 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -83,10 +83,13 @@ int main(int argc, char *argv[]) {
        if((connect(p_socket, (struct sockaddr *)&p_socketName,
                    sizeof(p_socketName))) >= 0) {
          QString temp;
          /*
           * We need a very uncommon token to use for parsing.
           */
          QChar escape(27);
          for(int i = 1; i < argc; i++) {
            temp += QFileInfo(
                  FileName(argv[i]).expanded()).absoluteFilePath()
                + " ";
            temp += QFileInfo(FileName(argv[i]).expanded()).absoluteFilePath();
            temp += QString(escape);
          }
          temp += "raise";
          // Try to send data to the socket
+4 −0
Changes for isis/src/qisis/apps/qview/qview.xml: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -135,5 +135,9 @@
      The plot tables should no longer have multiple rows with the same X value. Also, fixed a crash
      related to closing the plot table windows. Fixes #710. Fixes #818.
    </change>
    <change name="Kimberly Oyama and Stuart Sices" date="2013-12-30">
      Changed the character that is used as a token when parsing the list of file names used when
      the socket is already open. Fixes #1551.
    </change>
  </history>
</application>
+6 −4
Changes for isis/src/qisis/objs/ControlPointEdit/ControlPointEdit.cpp: 6 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -726,6 +726,7 @@ namespace Isis {

    p_rightMeasure = rightMeasure;
    p_pointId = pointId;
    qDebug() << "setright Measure:" << p_pointId;

    if (p_useGeometry) {
      //  get new ground map
@@ -1556,19 +1557,20 @@ namespace Isis {
    }

    //  Save chips - pattern, search and fit
    QString baseFile = p_pointId + "_" +
    QString baseFile = p_pointId.replace(" ", "_") + "_" +
                           toString((int)(p_leftMeasure ->GetSample())) + "_" +
                           toString((int)(p_leftMeasure ->GetLine()))   + "_" +
                           toString((int)(p_rightMeasure->GetSample())) + "_" +
                           toString((int)(p_rightMeasure->GetLine()))   + "_";
    QString fname = baseFile + "Search.cub";
    QString command = "$ISISROOT/bin/qview " + fname;
    qDebug() << "in save chips fname:" << fname;
    QString command = "$ISISROOT/bin/qview \'" + fname + "\'";
    p_autoRegFact->RegistrationSearchChip()->Write(fname);
    fname = baseFile + "Pattern.cub";
    command += " " + fname;
    command += " \'" + fname + "\'";
    p_autoRegFact->RegistrationPatternChip()->Write(fname);
    fname = baseFile + "Fit.cub";
    command += " " + fname + "&";
    command += " \'" + fname + "\' &";
    p_autoRegFact->FitChip()->Write(fname);
    ProgramLauncher::RunSystemCommand(command);
  }
Loading