From 7f4eaa574d48e4c25925ab991ad08acd21989154 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 4 Nov 2024 11:02:27 +0100 Subject: [PATCH] Block update of view until summary data is loaded --- .../Application/Tools/RiaImportEclipseCaseTools.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ApplicationLibCode/Application/Tools/RiaImportEclipseCaseTools.cpp b/ApplicationLibCode/Application/Tools/RiaImportEclipseCaseTools.cpp index a3183d0f17..5587816ee8 100644 --- a/ApplicationLibCode/Application/Tools/RiaImportEclipseCaseTools.cpp +++ b/ApplicationLibCode/Application/Tools/RiaImportEclipseCaseTools.cpp @@ -27,6 +27,7 @@ #include "RiaGuiApplication.h" #include "RiaLogging.h" #include "RiaPreferencesGrid.h" +#include "RiaViewRedrawScheduler.h" #include "RifEclipseSummaryTools.h" #include "RifReaderSettings.h" @@ -95,6 +96,10 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList& fil FileCaseIdMap openedFiles; + // Block updates until summary data is imported + // Process events is called during import of summary data, and this will trigger redraw of the 3D window + RiaViewRedrawScheduler::instance()->blockUpdate( true ); + // Import eclipse case files for ( const QString& gridCaseFile : selector.gridCaseFiles() ) { @@ -208,6 +213,8 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList& fil project->activeOilField()->completionTemplateCollection()->setDefaultUnitSystemBasedOnLoadedCases(); + RiaViewRedrawScheduler::instance()->blockUpdate( false ); + if ( RiaGuiApplication::isRunning() ) { if ( RiuPlotMainWindow::instance()->isVisible() ) RiuPlotMainWindowTools::refreshToolbars();