mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4429 Implement return status handling for command file interface
This commit is contained in:
@@ -56,12 +56,13 @@ RicfExportSnapshots::RicfExportSnapshots()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfExportSnapshots::execute()
|
||||
RicfCommandResponse RicfExportSnapshots::execute()
|
||||
{
|
||||
if (!RiaGuiApplication::isRunning())
|
||||
{
|
||||
RiaLogging::error(QString("RicfExportSnapshot: Command cannot run without a GUI"));
|
||||
return;
|
||||
QString error("RicfExportSnapshot: Command cannot run without a GUI");
|
||||
RiaLogging::error(error);
|
||||
return RicfCommandResponse(RicfCommandResponse::COMMAND_ERROR, error);
|
||||
}
|
||||
|
||||
RiuMainWindow* mainWnd = RiuMainWindow::instance();
|
||||
@@ -85,4 +86,6 @@ void RicfExportSnapshots::execute()
|
||||
|
||||
mainWnd->loadWinGeoAndDockToolBarLayout();
|
||||
RiaGuiApplication::instance()->processEvents();
|
||||
|
||||
return RicfCommandResponse();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user