Commit 3aec22df authored by Cole Neubauer's avatar Cole Neubauer
Browse files

Cub lists can now import without complete path Fixes #4956

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7849 41f8697f-d340-4b68-9986-7bafba869bb8
parent ed25a047
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -118,11 +118,17 @@ namespace Isis {
      foreach (FileName fileName, fileNames) {
        if (fileName.extension() == "lis") {
          TextFile listFile(fileName.expanded());
          QString path = fileName.path();
          QString lineOfListFile;

          while (listFile.GetLine(lineOfListFile)) {
            if (lineOfListFile.contains(path)){
              stateToSave.append(lineOfListFile);
            }
            else {
              stateToSave.append(path + "/" + lineOfListFile);
            }
          }
        }
        else {
          stateToSave.append(fileName.original());
@@ -310,7 +316,7 @@ namespace Isis {
   *
   * Copies an image to be imported for this ImportImagesWorkOrder into the
   * associated project. If we are not copying the image data, the a .ecub file will be created that
   * points to the original cube. Otherwise, a .cub will be copyied into the project and a .ecub
   * points to the original cube. Otherwise, a .cub will be copied into the project and a .ecub
   * will be created in the project that references the copied cube.
   * Note that if too many errors occur, the copying
   * will not proceed for remaining images in the import and a NULL pointer will be returned.
@@ -427,7 +433,6 @@ namespace Isis {

      foreach (QString confirmedImage, confirmedImages) {
        QStringList fileNameAndId = confirmedImage.split(",");

        confirmedImagesFileNames.append(fileNameAndId.first());

        // Determine if there was already a unique id provided for the file.
+2 −0
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@ namespace Isis {
   *                           asynchronous work order. Updated documentation. References #4732.
   *   @history 2017-05-01 Ian Humphrey - Updated undoExecution() so that when undo, imported
   *                           images are removed from the project tree. Fixes #4597.
   *   @history 2017-06-06 Cole Neubauer - Added ability to have cube lists without full file path
   *                           Fixes #4956
   */
  class ImportImagesWorkOrder : public WorkOrder {
      Q_OBJECT