mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7929 Python : Make sure progress dialog is created after early exit
On some systems, the progress dialog triggers redraw with incomplete data and causes crash. Make sure the progress dialog is created after early exit
This commit is contained in:
@@ -109,14 +109,16 @@ bool RimEclipseResultCase::openEclipseGridFile()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseResultCase::importGridAndResultMetaData( bool showTimeStepFilter )
|
||||
{
|
||||
// Early exit if data is already read
|
||||
// Make sure that the progress info dialog is created after the return statement. If created before, the progress
|
||||
// dialog triggers a redraw with incomplete geometry data and causes a crash
|
||||
if ( m_gridAndWellDataIsReadFromFile ) return true;
|
||||
|
||||
caf::ProgressInfo progInfo( 50, "Reading Eclipse Grid File" );
|
||||
|
||||
progInfo.setProgressDescription( "Open Grid File" );
|
||||
progInfo.setNextProgressIncrement( 48 );
|
||||
|
||||
// Early exit if data is already read
|
||||
if ( m_gridAndWellDataIsReadFromFile ) return true;
|
||||
|
||||
cvf::ref<RifReaderInterface> readerInterface;
|
||||
|
||||
if ( gridFileName().contains( "Result Mock Debug Model" ) )
|
||||
|
||||
Reference in New Issue
Block a user