#4847 Command Line Snapshots : Make sure image size is handled correctly

This commit is contained in:
Magne Sjaastad
2019-10-11 08:32:08 +02:00
parent 71760b0e34
commit 69ff4d25f2
6 changed files with 113 additions and 26 deletions

View File

@@ -203,7 +203,7 @@ void RiaRegressionTestRunner::runRegressionTest()
// Wait until all command objects have completed
app->waitUntilCommandObjectsHasBeenProcessed();
regressionTestConfigureProject();
setDefaultFixedWindowSizeFor3dViews();
resizePlotWindows();
@@ -469,7 +469,7 @@ void RiaRegressionTestRunner::removeDirectoryWithContent( QDir& dirToDelete )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaRegressionTestRunner::regressionTestConfigureProject()
void RiaRegressionTestRunner::setFixedWindowSizeFor3dViews( const QSize& snapshotImageSize )
{
RiuMainWindow* mainWnd = RiuMainWindow::instance();
if ( !mainWnd ) return;
@@ -498,12 +498,20 @@ void RiaRegressionTestRunner::regressionTestConfigureProject()
}
// This size is set to match the regression test reference images
riv->viewer()->setFixedSize( RiaRegressionTestRunner::regressionDefaultImageSize() );
riv->viewer()->setFixedSize( snapshotImageSize );
}
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaRegressionTestRunner::setDefaultFixedWindowSizeFor3dViews()
{
setFixedWindowSizeFor3dViews( RiaRegressionTestRunner::regressionDefaultImageSize() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------