Commit e8f2d0e3 authored by Adam Paquette's avatar Adam Paquette
Browse files

Fixed the Gui to properly return lists when accessing previous parameters in...

Fixed the Gui to properly return lists when accessing previous parameters in the parameter history. Fixes #4088.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6910 41f8697f-d340-4b68-9986-7bafba869bb8
parent a9fcaf2e
Loading
Loading
Loading
Loading
+25 −3
Original line number Diff line number Diff line
@@ -711,7 +711,29 @@ namespace Isis {
      Isis::PvlGroup &up = hist.group(useEntry);
      for (int k = 0; k < up.keywords(); k++) {
        QString key = up[k].name();
        QString val = up[k];
        QString val;
        // If the value has more than one element,
        // construct a string array of those elements
        if (up[k].size() > 1) {
          val = "(";
          for (int i = 0; i < up[k].size(); i++) {
            QString newVal = up[k][i];
            if (newVal.contains(",")) {
              newVal = '"' + newVal + '"';
            }
            if (i == up[k].size() - 1) {
              val += newVal + ")";
            }
            else {
              val += newVal + ", ";
            }
          }
        }
        // Else, return the value on its own
        else {
          QString newVal = up[k];
          val = newVal;
        }
        ui.Clear(key);
        ui.PutAsString(key, val);
      }
+2 −0
Original line number Diff line number Diff line
@@ -77,6 +77,8 @@ namespace Isis {
   *  @history 2013-01-28 Janet Barrett - Modified the AddParameter method to
   *                         also update exclusions for boolean widgets. References
   *                         #1452.
   *  @history 2016-06-28 Adam Paquette - Modified UpdateHistory to appropriately
   *                         retrieve lists from the history pvl
   */

  class Gui : public QMainWindow {