mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5189 Grid Case Group: Read Well Data Source when importing project
This commit is contained in:
parent
cebe0485da
commit
948d193e3e
@ -178,6 +178,8 @@ bool RimEclipseStatisticsCase::openEclipseGridFile()
|
||||
|
||||
this->setReservoirData( eclipseCase.p() );
|
||||
|
||||
loadSimulationWellDataFromSourceCase();
|
||||
|
||||
if ( m_populateSelectionAfterLoadingGrid )
|
||||
{
|
||||
this->populateResultSelection();
|
||||
@ -544,34 +546,7 @@ void RimEclipseStatisticsCase::fieldChangedByUi( const caf::PdmFieldHandle* chan
|
||||
|
||||
if ( &m_wellDataSourceCase == changedField )
|
||||
{
|
||||
// Find or load well data for given case
|
||||
RimEclipseCase* sourceResultCase = caseGroup()->caseCollection()->findByDescription( m_wellDataSourceCase );
|
||||
if ( sourceResultCase )
|
||||
{
|
||||
sourceResultCase->openEclipseGridFile();
|
||||
|
||||
// Propagate well info to statistics case
|
||||
if ( sourceResultCase->eclipseCaseData() )
|
||||
{
|
||||
const cvf::Collection<RigSimWellData>& sourceCaseSimWellData =
|
||||
sourceResultCase->eclipseCaseData()->wellResults();
|
||||
setWellResultsAndUpdateViews( sourceCaseSimWellData );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cvf::Collection<RigSimWellData> sourceCaseWellResults;
|
||||
setWellResultsAndUpdateViews( sourceCaseWellResults );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseStatisticsCase::setWellResultsAndUpdateViews( const cvf::Collection<RigSimWellData>& sourceCaseSimWellData )
|
||||
{
|
||||
this->eclipseCaseData()->setSimWellData( sourceCaseSimWellData );
|
||||
loadSimulationWellDataFromSourceCase();
|
||||
|
||||
caf::ProgressInfo progInfo( reservoirViews().size() + 1, "Updating Well Data for Views" );
|
||||
|
||||
@ -588,6 +563,34 @@ void RimEclipseStatisticsCase::setWellResultsAndUpdateViews( const cvf::Collecti
|
||||
progInfo.incrementProgress();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseStatisticsCase::loadSimulationWellDataFromSourceCase()
|
||||
{
|
||||
// Find or load well data for given case
|
||||
RimEclipseCase* sourceResultCase = caseGroup()->caseCollection()->findByDescription( m_wellDataSourceCase );
|
||||
if ( sourceResultCase )
|
||||
{
|
||||
sourceResultCase->openEclipseGridFile();
|
||||
|
||||
// Propagate well info to statistics case
|
||||
if ( sourceResultCase->eclipseCaseData() )
|
||||
{
|
||||
const cvf::Collection<RigSimWellData>& sourceCaseSimWellData =
|
||||
sourceResultCase->eclipseCaseData()->wellResults();
|
||||
|
||||
this->eclipseCaseData()->setSimWellData( sourceCaseSimWellData );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cvf::Collection<RigSimWellData> sourceCaseWellResults;
|
||||
this->eclipseCaseData()->setSimWellData( sourceCaseWellResults );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
@ -87,8 +87,6 @@ private:
|
||||
void updateSelectionSummaryLabel();
|
||||
void updatePercentileUiVisibility();
|
||||
|
||||
void setWellResultsAndUpdateViews( const cvf::Collection<RigSimWellData>& sourceCaseSimWellData );
|
||||
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
@ -96,6 +94,8 @@ private:
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
|
||||
void loadSimulationWellDataFromSourceCase();
|
||||
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
Loading…
Reference in New Issue
Block a user