#5185 Regression Test : Always set regression image size on snapshot commands

This commit is contained in:
Magne Sjaastad
2019-12-05 09:25:44 +01:00
parent 6636ae7d64
commit 73869c0036
5 changed files with 31 additions and 12 deletions

View File

@@ -25,6 +25,7 @@
#include "RiaGuiApplication.h"
#include "RiaLogging.h"
#include "RiaRegressionTestRunner.h"
#include "RiuMainWindow.h"
@@ -87,6 +88,13 @@ RicfCommandResponse RicfExportSnapshots::execute()
}
if ( m_type == RicfExportSnapshots::VIEWS || m_type == RicfExportSnapshots::ALL )
{
if ( RiaRegressionTestRunner::instance()->isRunningRegressionTests() )
{
RiaRegressionTestRunner::setDefaultSnapshotSizeFor3dViews();
QApplication::processEvents();
}
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( absolutePathToSnapshotDir,
m_prefix,
m_caseId(),
@@ -94,6 +102,13 @@ RicfCommandResponse RicfExportSnapshots::execute()
}
if ( m_type == RicfExportSnapshots::PLOTS || m_type == RicfExportSnapshots::ALL )
{
if ( RiaRegressionTestRunner::instance()->isRunningRegressionTests() )
{
RiaRegressionTestRunner::setDefaultSnapshotSizeForPlotWindows();
QApplication::processEvents();
}
RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( absolutePathToSnapshotDir,
m_prefix,
m_viewId() );

View File

@@ -22,7 +22,6 @@
#include "RiaApplication.h"
#include "RiaLogging.h"
#include "RiaRegressionTestRunner.h"
#include <QDir>
#include <QFileInfo>
@@ -57,11 +56,6 @@ RicfCommandResponse RicfOpenProject::execute()
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, errMsg );
}
if ( RiaRegressionTestRunner::instance()->isRunningRegressionTests() )
{
RiaRegressionTestRunner::setDefaultFixedWindowSizeFor3dViews();
}
RicfCommandFileExecutor::instance()->setLastProjectPath( projectPath );
return RicfCommandResponse();