mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 20:20:48 -06:00
#4852 Command Line : Add snapshotsize
This commit is contained in:
parent
4bfcf86962
commit
225893dcda
@ -648,9 +648,6 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
||||
setStartDir( cvfqt::Utils::toQString( o.value( 0 ) ) );
|
||||
}
|
||||
|
||||
int snapshotWidth = -1;
|
||||
int snapshotHeight = -1;
|
||||
|
||||
if ( cvf::Option o = progOpt->option( "size" ) )
|
||||
{
|
||||
int width = o.safeValue( 0 ).toInt( -1 );
|
||||
@ -658,9 +655,6 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
||||
|
||||
if ( width > 0 && height > 0 )
|
||||
{
|
||||
snapshotWidth = width;
|
||||
snapshotHeight = height;
|
||||
|
||||
auto mainWindow = RiuMainWindow::instance();
|
||||
if ( mainWindow )
|
||||
{
|
||||
@ -675,6 +669,20 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
||||
}
|
||||
}
|
||||
|
||||
int snapshotWidth = -1;
|
||||
int snapshotHeight = -1;
|
||||
if ( cvf::Option o = progOpt->option( "snapshotsize" ) )
|
||||
{
|
||||
int width = o.safeValue( 0 ).toInt( -1 );
|
||||
int height = o.safeValue( 1 ).toInt( -1 );
|
||||
|
||||
if ( width > 0 && height > 0 )
|
||||
{
|
||||
snapshotWidth = width;
|
||||
snapshotHeight = height;
|
||||
}
|
||||
}
|
||||
|
||||
if ( cvf::Option o = progOpt->option( "summaryplot" ) )
|
||||
{
|
||||
RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( cvfqt::Utils::toQStringList( o.values() ) );
|
||||
|
@ -100,6 +100,10 @@ bool RiaArgumentParser::parseArguments( cvf::ProgramOptions* progOpt )
|
||||
"'commandFileReplaceCases'.\n",
|
||||
cvf::ProgramOptions::SINGLE_VALUE );
|
||||
|
||||
progOpt->registerOption( "snapshotsize",
|
||||
"<width> <height>",
|
||||
"Set size of exported snapshot images.",
|
||||
cvf::ProgramOptions::MULTI_VALUE );
|
||||
progOpt->registerOption( "savesnapshots",
|
||||
"all|views|plots",
|
||||
"Save snapshot of all views or plots to project file location sub folder 'snapshots'. "
|
||||
|
Loading…
Reference in New Issue
Block a user