mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1384 Regression test : Add resize of plot windows
This commit is contained in:
parent
c75a79a260
commit
c23ac3c8ae
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user