From 8a579122459d49775fde5240c7539b449104d530 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 3 Dec 2019 10:39:19 +0100 Subject: [PATCH] #5157 Regression Test : Some images get wrong size --- ApplicationCode/Application/Tools/RiaRegressionTestRunner.cpp | 4 ++-- ApplicationCode/UserInterface/RiuPlotMainWindow.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ApplicationCode/Application/Tools/RiaRegressionTestRunner.cpp b/ApplicationCode/Application/Tools/RiaRegressionTestRunner.cpp index 96f260a301..53cf4e2621 100644 --- a/ApplicationCode/Application/Tools/RiaRegressionTestRunner.cpp +++ b/ApplicationCode/Application/Tools/RiaRegressionTestRunner.cpp @@ -203,11 +203,11 @@ void RiaRegressionTestRunner::runRegressionTest() setDefaultFixedWindowSizeFor3dViews(); - resizePlotWindows(); - QString fullPathGeneratedFolder = testCaseFolder.absoluteFilePath( generatedFolderName ); RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( fullPathGeneratedFolder ); + QApplication::processEvents(); + resizePlotWindows(); RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( fullPathGeneratedFolder ); app->closeProject(); diff --git a/ApplicationCode/UserInterface/RiuPlotMainWindow.cpp b/ApplicationCode/UserInterface/RiuPlotMainWindow.cpp index e197164ae0..84f70da47c 100644 --- a/ApplicationCode/UserInterface/RiuPlotMainWindow.cpp +++ b/ApplicationCode/UserInterface/RiuPlotMainWindow.cpp @@ -21,6 +21,7 @@ #include "RiaApplication.h" #include "RiaBaseDefs.h" #include "RiaPreferences.h" +#include "RiaRegressionTestRunner.h" #include "RiaSummaryTools.h" #include "RimEnsembleCurveSetCollection.h" @@ -127,7 +128,8 @@ void RiuPlotMainWindow::initializeGuiNewProjectLoaded() tileSubWindows(); } - if ( m_activePlotViewWindow && m_activePlotViewWindow->viewWidget() ) + if ( m_activePlotViewWindow && m_activePlotViewWindow->viewWidget() && + !RiaRegressionTestRunner::instance()->isRunningRegressionTests() ) { if ( m_activePlotViewWindow->mdiWindowGeometry().isMaximized ) {