#279 Activate riuMainWindow before taking snapshots during regression tests

This commit is contained in:
Magne Sjaastad
2016-11-01 11:50:38 +01:00
parent cae5c42f68
commit 67894ecef0

View File

@@ -1903,8 +1903,11 @@ void RiaApplication::saveSnapshotForAllViews(const QString& snapshotFolderName)
RiuMainWindow* mainWnd = RiuMainWindow::instance();
if (!mainWnd) return;
if (m_project.isNull()) return;
// Activate RiuMainWindow to make sure there is an active main window used from snapshot code in
// RicSnapshotViewToFileFeature::saveSnapshotAs()
QApplication::setActiveWindow(mainWnd);
if (m_project.isNull()) return;
QDir snapshotPath(snapshotFolderName);
if (!snapshotPath.exists())