Unverified Commit 19c08ecc authored by Makayla Shepherd's avatar Makayla Shepherd Committed by GitHub
Browse files

Merge pull request #138 from chrisryancombs/m05350

Added support for cube label files before assuming cubelist. Fixes #5350.
parents ada69bb1 305cbfed
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -338,13 +338,13 @@ namespace Isis {
    QList<QString> cubesToOpen;

    // If the file is a cub file, we add the path to it to our list of cubes to open.
    if ( cubeFileName.suffix() == "cub" || cubeFileName.suffix() == "cube" ) {
    if ( cubeFileName.suffix() == "cub" || cubeFileName.suffix() == "cube" || cubeFileName.suffix() == "lbl") {
      // cubesToOpen.append(cubeFileName.absoluteFilePath());
      cubesToOpen.append(cubeFileName.filePath());
    }
    else {
      // If the file received isn't a .cub, it has to be a cubelist. We read every cube in the cubelist
      // And append it to the cubesToOpen QList so that we can open them.
      // If the file received isn't a cube or label, it has to be a cubelist. We read every cube in
      // the cubelist and append it to the cubesToOpen QList so that we can open them.
      QFile file(cubename);
      file.open(QIODevice::ReadOnly);

+2 −0
Original line number Diff line number Diff line
@@ -79,6 +79,8 @@ namespace Isis {
  *                           class, Shape, which also contains a cube, but not an Image.
  *   @history 2017-09-11 Adam Goins - Added the ability to accept cubelists under any file format.
  *                           Fixes #5099.
  *   @history 2018-04-13 Christopher Combs - Added .lbl files to the list of single-cube file-extensions
  *                           to check before reading a cube list in addCubeViewport. Fixes #5350.
  */
  class Workspace : public QWidget {
      Q_OBJECT