Skip to content

Commit

Permalink
Avoid redraw of 3D views during summary import
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Nov 4, 2024
1 parent c64dbf5 commit 683cf67
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "RiaGuiApplication.h"
#include "RiaLogging.h"
#include "RiaPreferencesGrid.h"
#include "RiaViewRedrawScheduler.h"

#include "RifEclipseSummaryTools.h"
#include "RifReaderSettings.h"
Expand Down Expand Up @@ -95,6 +96,10 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList& fil

FileCaseIdMap openedFiles;

// Block updates until import of summary data is completed. QApplication::processEvents() is called during import of summary data, and
// this will trigger redraw of the 3D views in RiaViewRedrawScheduler
RiaViewRedrawScheduler::instance()->blockUpdate( true );

// Import eclipse case files
for ( const QString& gridCaseFile : selector.gridCaseFiles() )
{
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 683cf67

Please sign in to comment.