From ebf5b01234c6c3e8591377be70e0f48131efec46 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 22 Dec 2016 08:44:36 +0100 Subject: [PATCH] #1018 Force update of display model for scheduled updates before taking snapshot --- ApplicationCode/Application/RiaApplication.h | 7 ++++++- ApplicationCode/ProjectDataModel/RimView.cpp | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/Application/RiaApplication.h b/ApplicationCode/Application/RiaApplication.h index 0cfd04432e..3f5ec65924 100644 --- a/ApplicationCode/Application/RiaApplication.h +++ b/ApplicationCode/Application/RiaApplication.h @@ -212,9 +212,14 @@ private: private slots: void slotWorkerProcessFinished(int exitCode, QProcess::ExitStatus exitStatus); - void slotUpdateScheduledDisplayModels(); + // Friend classes required to have access to slotUpdateScheduledDisplayModels + // As snapshots are produced fast in sequence, the feature must have access to force redraw + // of scheduled redraws + friend class RimView; + friend class RicExportMultipleSnapshotsFeature; + private: caf::PdmPointer m_activeReservoirView; caf::PdmPointer m_activeWellLogPlot; diff --git a/ApplicationCode/ProjectDataModel/RimView.cpp b/ApplicationCode/ProjectDataModel/RimView.cpp index aff25c9b4b..f689702dd0 100644 --- a/ApplicationCode/ProjectDataModel/RimView.cpp +++ b/ApplicationCode/ProjectDataModel/RimView.cpp @@ -260,6 +260,9 @@ QImage RimView::snapshotWindowContent() { if (m_viewer) { + // Force update of scheduled display models before snapshotting + RiaApplication::instance()->slotUpdateScheduledDisplayModels(); + m_viewer->repaint(); return m_viewer->snapshotImage();