Unverified Commit 8e02baf5 authored by Tyler Wilson's avatar Tyler Wilson Committed by GitHub
Browse files

Merge pull request #337 from kdl222/ipce

selectedBOSSImages() will return a list of all images and image lists if no images are selected in the project tree
parents db5060fd 59374325
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -192,6 +192,22 @@ namespace Isis {
    QList<ProjectItem *> items;
    QModelIndexList indices = selection.indexes();

    // If nothing is selected, fill items with all image lists and images.
    if (indices.size() == 0) {
      ProjectItem *imageRoot = findItemData(QVariant("Images"), 0);
      items.append(imageRoot);
      for (int i = 0; i < imageRoot->rowCount(); i++) {
        ProjectItem *imglistItem = imageRoot->child(i);
        items.append(imglistItem);
        for (int j = 0; j < imglistItem->rowCount(); j++) {
          ProjectItem *imgItem = imglistItem->child(j);
          if (imgItem->isImage()) {
            items.append(imgItem);
          }
        }
      }
      return items;
    }

    //Query the selected items to see if they have children
    foreach ( QModelIndex ix, indices ) {
+6 −3
Original line number Diff line number Diff line
@@ -139,6 +139,9 @@ namespace Isis {
   *                           (but not all) of the images within that list, the function returned
   *                           all of the images in the list and not just the selected ones.
   *                           References #497.
   *   @history 2018-07-10 Kaitlyn Lee - If a user does not select any images in the project tree,
   *                           all image lists and images will be returned in selectedBOSSImages().
   *                           References #497.
   */
  class ProjectItemModel : public QStandardItemModel {

+3 −3

File changed.

Contains only whitespace changes.