Commit 0ff99ad8 authored by Makayla Shepherd's avatar Makayla Shepherd
Browse files

PROG Fixed an issue with the image and shape imports display on the project...

PROG Fixed an issue with the image and shape imports display on the project tree with a blank name. References #4979, #4980.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7866 41f8697f-d340-4b68-9986-7bafba869bb8
parent 868de615
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -1835,8 +1835,13 @@ namespace Isis {
              image, SLOT(updateFileName(Project *)));

      (*m_idToImageMap)[image->id()] = image;
      if (images.name() != "") {
        createOrRetrieveImageList(images.name())->append(image);
      }
      else {
        createOrRetrieveImageList(FileName(images[0]->fileName()).dir().dirName())->append(image);
      }
    }

    // We really can't have all of the cubes in memory before
    //   the OS stops letting us open more files.
@@ -2087,8 +2092,14 @@ namespace Isis {
              shape, SLOT(updateFileName(Project *)));

      (*m_idToShapeMap)[shape->id()] = shape;
      if (shapes.name() != "") {
        createOrRetrieveShapeList(shapes.name())->append(shape);
      }
      else {
        createOrRetrieveShapeList(FileName(shapes[0]->fileName()).dir().dirName())->append(shape);
      }

    }

    // We really can't have all of the cubes in memory before
    //   the OS stops letting us open more files.
+12 −2
Original line number Diff line number Diff line
@@ -740,7 +740,12 @@ namespace Isis {
   * @param[in] imageList (ImageList *) The ImageList.
   */
  void ProjectItem::setImageList(ImageList *imageList) {
    if (imageList->name() != "") {
      setText( imageList->name() );
    }
    else {
      setText( imageList->path() );
    }
    setIcon( QIcon(":pictures") );
    setData( QVariant::fromValue<ImageList *>(imageList) );
  }
@@ -774,7 +779,12 @@ namespace Isis {
   * @param[in] shapeList (ShapeList *) The ShapeList.
   */
  void ProjectItem::setShapeList(ShapeList *shapeList) {
    if (shapeList->name() != "") {
      setText( shapeList->name() );
    }
    else {
      setText( shapeList->path() );
    }
    setIcon( QIcon(":dem") );
    setData( QVariant::fromValue<ShapeList *>(shapeList) );
  }