#4965 Fix crash when importing Eclipse input case.

Added guard to avoid importing faults from the input property files when
faults already exists in the eclipse case. Faults can theoretically appear
in any of the files, but reading and appending them to the existing fault
collection is not currently supported.
This commit is contained in:
Kristian Bendiksen
2019-11-05 13:32:13 +01:00
parent ed59f0b618
commit 44b9e52e1b

View File

@@ -103,7 +103,10 @@ bool RifEclipseInputPropertyLoader::readInputPropertiesFromFiles( RimEclipseInpu
inputPropertyCollection->inputProperties.push_back( inputProperty );
}
if ( importFaults )
// Avoid importing faults from the input property files when faults already exists in
// the eclipse case. Faults can theoretically appear in any of the files, but reading
// and appending them to the existing fault collection is not currently supported.
if ( importFaults && eclipseCaseData->mainGrid()->faults().empty() )
{
cvf::Collection<RigFault> faultCollection;
RifEclipseInputFileTools::parseAndReadFaults( propertyFileName, &faultCollection );