#1384 Regression test : Add resize of plot windows

This commit is contained in:
Magne Sjaastad 2017-04-24 09:39:54 +02:00
parent c75a79a260
commit c23ac3c8ae
2 changed files with 34 additions and 1 deletions

View File

@ -2381,6 +2381,8 @@ void RiaApplication::runRegressionTest(const QString& testRootPath)
regressionTestConfigureProject();
resizeMaximizedPlotWindows();
QString fullPathGeneratedFolder = testCaseFolder.absoluteFilePath(generatedFolderName);
saveSnapshotForAllViews(fullPathGeneratedFolder);
@ -2416,6 +2418,36 @@ void RiaApplication::runRegressionTest(const QString& testRootPath)
m_runningRegressionTests = false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaApplication::resizeMaximizedPlotWindows()
{
std::vector<RimViewWindow*> viewWindows;
for (auto viewWindow : viewWindows)
{
if (viewWindow->isMdiWindow())
{
RimMdiWindowGeometry wndGeo = viewWindow->mdiWindowGeometry();
if (wndGeo.isMaximized)
{
QWidget* viewWidget = viewWindow->viewWidget();
if (viewWidget)
{
QMdiSubWindow* mdiWindow = m_mainPlotWindow->findMdiSubWindow(viewWidget);
if (mdiWindow)
{
mdiWindow->showNormal();
viewWidget->resize(RiaApplication::regressionDefaultImageSize());
}
}
}
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -2810,7 +2842,6 @@ void RiaApplication::executeRegressionTests(const QString& regressionTestPath)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -213,9 +213,11 @@ private:
void storeTreeViewState();
void resizeMaximizedPlotWindows();
void updateRegressionTest(const QString& testRootPath);
void regressionTestConfigureProject();
static QSize regressionDefaultImageSize();
private slots:
void slotWorkerProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
void slotUpdateScheduledDisplayModels();