#4852 Command Line : Add snapshotsize

This commit is contained in:
Magne Sjaastad
2019-10-11 10:57:20 +02:00
parent 4bfcf86962
commit 225893dcda
2 changed files with 18 additions and 6 deletions

View File

@@ -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() ) );