Commit 34604724 authored by Marjorie Hahn's avatar Marjorie Hahn
Browse files

Added missing context menu items in footprintview. Fixes #5027.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7871 41f8697f-d340-4b68-9986-7bafba869bb8
parent 9fecd1bc
Loading
Loading
Loading
Loading
+35 −33
Original line number Diff line number Diff line
@@ -554,13 +554,20 @@ namespace Isis {
   *                                 ChangeTransparency, ChangeColor, RandomColor,
   *                                 ToggleShowLabel, ToggleShowFilled, ToggleShowCubeData,
   *                                 ToggleShowOutline.
   * @internal
   *   @history 2017-07-21 Marjorie Hahn - Removed unnecessary null project check around 
   *                           the QActions for moveToTopAct, moveToTop, moveToBottomAct,
   *                           moveToBottom, and zoomFit. This allows these actions to be
   *                           available in IPCE as well as qmos. Fixes #5027.
   */
  QList<QAction *> ImageList::supportedActions(Project *project) {
    
    QList<QAction *> actions;
    
    // It turns out connect() statements cannot be templated, hence they aren't inside of
    //   createWorkOrder().
    if (allSupport(ImageDisplayProperties::Color)) {
      
      QAction *alphaAction = createWorkOrder(project, ImageListActionWorkOrder::ChangeTransparency);
      if (!project) {
        connect(alphaAction, SIGNAL(triggered()),
@@ -575,7 +582,6 @@ namespace Isis {
      }
      actions.append(colorAction);


      QAction *ranColorAction = createWorkOrder(project, ImageListActionWorkOrder::RandomizeColor);
      if (!project) {
        connect(ranColorAction, SIGNAL(triggered()),
@@ -584,7 +590,6 @@ namespace Isis {
      actions.append(ranColorAction);
    }


    if (allSupport(ImageDisplayProperties::ShowLabel)) {
      QAction *labelVisibleAction = createWorkOrder(project,
                                                    ImageListActionWorkOrder::ToggleShowLabel);
@@ -595,7 +600,6 @@ namespace Isis {
      actions.append(labelVisibleAction);
    }


    if (allSupport(ImageDisplayProperties::ShowFill)) {
      QAction *fillAction = createWorkOrder(project, ImageListActionWorkOrder::ToggleShowFilled);
      if (!project) {
@@ -605,7 +609,6 @@ namespace Isis {
      actions.append(fillAction);
    }


    if (allSupport(ImageDisplayProperties::ShowDNs)) {
      QAction *cubeDataAction = createWorkOrder(project,
                                                ImageListActionWorkOrder::ToggleShowCubeData);
@@ -616,7 +619,6 @@ namespace Isis {
      actions.append(cubeDataAction);
    }


    if (allSupport(ImageDisplayProperties::ShowOutline)) {
      QAction *outlineAction = createWorkOrder(project,
                                               ImageListActionWorkOrder::ToggleShowOutline);
@@ -629,8 +631,8 @@ namespace Isis {

    actions.append(NULL);

    if (!project) {
    if (allSupport(ImageDisplayProperties::ZOrdering)) {
                
      QAction *moveToTopAct = new QAction(tr("Bring to Front"), this);
      QAction *moveUpAct = new QAction(tr("Bring Forward"), this);
      QAction *moveToBottomAct = new QAction(tr("Send to Back"), this);
@@ -649,6 +651,7 @@ namespace Isis {
        connect(moveDownAct, SIGNAL(triggered()),
                image->displayProperties(), SIGNAL(moveDownOne()));
      }
      
      actions.append(moveToTopAct);
      actions.append(moveUpAct);
      actions.append(moveToBottomAct);
@@ -663,7 +666,6 @@ namespace Isis {
              first()->displayProperties(), SIGNAL(zoomFit()));
      actions.append(zoomFit);
    }
    }

    return actions;
  }