mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-01 08:38:00 -06:00
Support running jobs without blocking GUI (#13040)
* Add view job log command. * Add stop job command. * Do not block ui while job is running. * Show progress while job is running * Make sure user gets notified of running jobs when exiting ResInsight or closing current project.
This commit is contained in:
29 files changed
+809
-122
No files matched your search
@@ -48,6 +48,7 @@
|
||||
#include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h"
|
||||
|
||||
#include "Formations/RimFormationNamesCollection.h"
|
||||
#include "Jobs/RimJobCollection.h"
|
||||
#include "Rim2dIntersectionViewCollection.h"
|
||||
#include "RimAnnotationCollection.h"
|
||||
#include "RimAnnotationInViewCollection.h"
|
||||
@@ -289,6 +290,34 @@ bool RiaGuiApplication::saveProjectAs( const QString& fileName )
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaGuiApplication::notifyUserAboutRunningJobs()
|
||||
{
|
||||
if ( m_project->jobCollection()->numberOfRunningJobs() > 0 )
|
||||
{
|
||||
QMessageBox::critical( nullptr,
|
||||
"Active running jobs",
|
||||
"One or more jobs are still running, you need to stop all jobs before continuing." );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaGuiApplication::checkWithUserBeforeClose()
|
||||
{
|
||||
// check for any running jobs
|
||||
if ( !notifyUserAboutRunningJobs() ) return false;
|
||||
// ask user to save modified project if needed
|
||||
if ( !askUserToSaveModifiedProject() ) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user