mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #4844 from OPM/improve-command-line-
#4765 Summary : Support command line snapshots without a project file
This commit is contained in:
commit
71760b0e34
@ -821,36 +821,33 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( project() != nullptr && !project()->fileName().isEmpty() )
|
QString exportFolder = QDir::currentPath() + "/snapshots";
|
||||||
|
|
||||||
|
if ( snapshotViews )
|
||||||
{
|
{
|
||||||
if ( snapshotViews )
|
RiuMainWindow* mainWnd = RiuMainWindow::instance();
|
||||||
|
CVF_ASSERT( mainWnd );
|
||||||
|
mainWnd->hideAllDockWidgets();
|
||||||
|
|
||||||
|
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( exportFolder );
|
||||||
|
|
||||||
|
mainWnd->loadWinGeoAndDockToolBarLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( snapshotPlots )
|
||||||
|
{
|
||||||
|
if ( mainPlotWindow() )
|
||||||
{
|
{
|
||||||
RiuMainWindow* mainWnd = RiuMainWindow::instance();
|
mainPlotWindow()->hideAllDockWidgets();
|
||||||
CVF_ASSERT( mainWnd );
|
|
||||||
mainWnd->hideAllDockWidgets();
|
|
||||||
|
|
||||||
// 2016-11-09 : Location of snapshot folder was previously located in 'snapshot' folder
|
RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( exportFolder );
|
||||||
// relative to current working folder. Now harmonized to behave as RiuMainWindow::slotSnapshotAllViewsToFile()
|
|
||||||
QString absolutePathToSnapshotDir = createAbsolutePathFromProjectRelativePath( "snapshots" );
|
|
||||||
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( absolutePathToSnapshotDir );
|
|
||||||
|
|
||||||
mainWnd->loadWinGeoAndDockToolBarLayout();
|
mainPlotWindow()->loadWinGeoAndDockToolBarLayout();
|
||||||
}
|
|
||||||
|
|
||||||
if ( snapshotPlots )
|
|
||||||
{
|
|
||||||
if ( mainPlotWindow() )
|
|
||||||
{
|
|
||||||
mainPlotWindow()->hideAllDockWidgets();
|
|
||||||
|
|
||||||
// Will be saved relative to current directory
|
|
||||||
RicSnapshotAllPlotsToFileFeature::saveAllPlots();
|
|
||||||
|
|
||||||
mainPlotWindow()->loadWinGeoAndDockToolBarLayout();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closeProject();
|
||||||
|
|
||||||
return EXIT_COMPLETED;
|
return EXIT_COMPLETED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user