mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make sure seismic file reader is created in RiaApplication::loadProject()
This commit is contained in:
parent
a4428c1271
commit
18e9ef0558
@ -68,6 +68,8 @@
|
||||
#include "RimPlotWindow.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimScriptCollection.h"
|
||||
#include "RimSeismicData.h"
|
||||
#include "RimSeismicDataCollection.h"
|
||||
#include "RimSeismicView.h"
|
||||
#include "RimSeismicViewCollection.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
@ -526,7 +528,6 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
}
|
||||
}
|
||||
|
||||
// Add well paths for each oil field
|
||||
for ( size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++ )
|
||||
{
|
||||
RimOilField* oilField = m_project->oilFields[oilFieldIdx];
|
||||
@ -536,8 +537,16 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
oilField->wellPathCollection = std::make_unique<RimWellPathCollection>();
|
||||
}
|
||||
|
||||
// Initialize well paths
|
||||
oilField->wellPathCollection->loadDataAndUpdate();
|
||||
oilField->ensembleWellLogsCollection->loadDataAndUpdate();
|
||||
|
||||
// Initialize seismic data
|
||||
auto& seisDataColl = oilField->seismicDataCollection();
|
||||
for ( auto seismicData : seisDataColl->seismicData() )
|
||||
{
|
||||
seismicData->ensureFileReaderIsInitialized();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -145,14 +145,6 @@ void RimSeismicData::logError( QString msg )
|
||||
m_nErrorsLogged++;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSeismicData::initAfterRead()
|
||||
{
|
||||
updateMetaData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -498,6 +490,16 @@ std::pair<double, double> RimSeismicData::dataRangeMinMax() const
|
||||
return m_activeDataRange;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSeismicData::ensureFileReaderIsInitialized()
|
||||
{
|
||||
if ( !openFileIfNotOpen() ) return;
|
||||
|
||||
updateMetaData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -69,9 +69,10 @@ public:
|
||||
|
||||
std::pair<double, double> dataRangeMinMax() const override;
|
||||
|
||||
void ensureFileReaderIsInitialized();
|
||||
|
||||
protected:
|
||||
void updateMetaData();
|
||||
void initAfterRead() override;
|
||||
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user