mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
#6393 Snapshot : Make sure widgets are activated before taking snapshot
If the active plot window is maximized in the MDI area, all plots will create the same snapshot size.
This commit is contained in:
1 parent
7e097a7364
commit
b1fb7990dc
3 files changed
+19
-1
No files matched your search
@@ -113,16 +113,22 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
|
||||
}
|
||||
if ( m_type == RicfExportSnapshots::SnapshotsType::PLOTS || m_type == RicfExportSnapshots::SnapshotsType::ALL )
|
||||
{
|
||||
bool activateWidget = false;
|
||||
if ( RiaRegressionTestRunner::instance()->isRunningRegressionTests() )
|
||||
{
|
||||
RiaRegressionTestRunner::setDefaultSnapshotSizeForPlotWindows();
|
||||
|
||||
QApplication::processEvents();
|
||||
}
|
||||
else
|
||||
{
|
||||
activateWidget = true;
|
||||
}
|
||||
|
||||
QString fileSuffix = ".png";
|
||||
if ( m_plotOutputFormat == PlotOutputFormat::PDF ) fileSuffix = ".pdf";
|
||||
RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( absolutePathToSnapshotDir,
|
||||
activateWidget,
|
||||
m_prefix,
|
||||
m_viewId(),
|
||||
fileSuffix );
|
||||
|
||||
Reference in new issue
Block a user