mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5717 Properly reload input properties when reading eclipse result case.
This commit is contained in:
committed by
Magne Sjaastad
parent
b566ddbd4b
commit
b5c97ec750
@@ -216,7 +216,7 @@ bool RimEclipseInputCase::openEclipseGridFile()
|
||||
this->eclipseCaseData()->mainGrid()->setFlipAxis( m_flipXAxis, m_flipYAxis );
|
||||
|
||||
computeCachedData();
|
||||
loadAndSyncronizeInputProperties();
|
||||
loadAndSyncronizeInputProperties( true );
|
||||
}
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
@@ -240,29 +240,6 @@ void RimEclipseInputCase::reloadEclipseGridFile()
|
||||
openReserviorCase();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Loads input property data from the gridFile and additional files
|
||||
/// Creates new InputProperties if necessary, and flags the unused ones as obsolete
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseInputCase::loadAndSyncronizeInputProperties()
|
||||
{
|
||||
// Make sure we actually have reservoir data
|
||||
|
||||
CVF_ASSERT( this->eclipseCaseData() );
|
||||
CVF_ASSERT( this->eclipseCaseData()->mainGrid()->gridPointDimensions() != cvf::Vec3st( 0, 0, 0 ) );
|
||||
|
||||
// Then read the properties from all the files referenced by the InputReservoir
|
||||
|
||||
std::vector<QString> filenames;
|
||||
for ( const QString& fileName : additionalFiles() )
|
||||
{
|
||||
filenames.push_back( fileName );
|
||||
}
|
||||
filenames.push_back( gridFileName() );
|
||||
|
||||
RifEclipseInputPropertyLoader::loadAndSyncronizeInputProperties( inputPropertyCollection(), eclipseCaseData(), filenames );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -372,19 +349,3 @@ void RimEclipseInputCase::updateAdditionalFileFolder( const QString& newFolder )
|
||||
inputProperty->fileName = newFilePath.absoluteFilePath();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RimEclipseInputCase::additionalFiles() const
|
||||
{
|
||||
std::vector<QString> additionalFiles;
|
||||
for ( const RimEclipseInputProperty* inputProperty : m_inputPropertyCollection()->inputProperties() )
|
||||
{
|
||||
if ( inputProperty->fileName == gridFileName() ) continue;
|
||||
|
||||
additionalFiles.push_back( inputProperty->fileName().path() );
|
||||
}
|
||||
|
||||
return additionalFiles;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user