Commit 6640013f authored by Tyler Wilson's avatar Tyler Wilson
Browse files

Fixed a problem with the progress bar not being updated for any work order. Fixes #5149

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@8289 41f8697f-d340-4b68-9986-7bafba869bb8
parent d2ff5065
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include <QStringList>

#include "FileName.h"
#include "ProgressBar.h"
#include "Project.h"

namespace Isis {
@@ -97,7 +98,7 @@ namespace Isis {
   */
  bool OpenRecentProjectWorkOrder::setupExecution() {
    bool success = WorkOrder::setupExecution();

    delete progressBar();
    if (!success) return false;

    //success && !project()->isClean() && project()->isOpen()
+5 −0
Original line number Diff line number Diff line
@@ -53,6 +53,11 @@ namespace Isis {
   *                           project so when the user opens a project from the recent projects
   *                           menu it does not ask the user to save on exit if the project has not 
   *                           changed. Fixes # 5221.
   *   @history 2017-11-08 Tyler Wilson - Added a line to delete the progress bar
   *                                in setupExecution, to prevent a segfault
   *                                from occurring in HistoryTreeWidget whenever a 
   *                                a user attempted to open a recent project from
   *                                the File Menu.  Fixes #5149.
   */


+3 −2
Original line number Diff line number Diff line
@@ -135,7 +135,8 @@ namespace Isis {
      newItem->setFont(1, progressFont);
      newItem->setForeground(1, Qt::gray);

      this->insertTopLevelItem(0, newItem);

      invisibleRootItem()->addChild(newItem);

      connect(workOrder, SIGNAL(statusChanged(WorkOrder *)),
                this, SLOT(updateStatus(WorkOrder *)));
@@ -150,7 +151,7 @@ namespace Isis {
      //include those that do not need it.

      if(workOrder->progressBar() )  {
        this->setItemWidget(newItem, 1, new ProgressBar );
        this->setItemWidget(newItem, 1, workOrder->progressBar() );
      }
      scrollToItem(newItem);
      refit();
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@ namespace Isis {
   *                            addresses the immediate problem, but will have to be tackled
   *                            in a future ticket.  Fixes #5096.  References #4492.
   *   @history 2017-08-11 Cole Neubauer - Added some checks to avoid segfaults Fixes #5064
   *   @history 2017-11-08 Tyler Wilson - Reverted the code change in #5096 to restore the 
   *                            ProgressBar, and changed code in OpenRecentProjectsWorkOrder.cpp
   *                            to prevent the segfault which #5096 was addressing.  Fixes #5149.
   *
   */
  class HistoryTreeWidget : public QTreeWidget {
      Q_OBJECT