diff --git a/ApplicationLibCode/Commands/RicElasticPropertiesImportTools.cpp b/ApplicationLibCode/Commands/RicElasticPropertiesImportTools.cpp index e433a40253..1fba26238e 100644 --- a/ApplicationLibCode/Commands/RicElasticPropertiesImportTools.cpp +++ b/ApplicationLibCode/Commands/RicElasticPropertiesImportTools.cpp @@ -103,9 +103,10 @@ void RicElasticPropertiesImportTools::importElasticPropertiesFromFile( const QSt // Group the items with a given facies key for ( RifElasticProperties item : rifElasticProperties ) { - if ( item.fieldName == fieldName && - ( item.formationName == formationName || item.formationName == formationWildCard ) && - item.faciesName == faciesName ) + if ( item.fieldName.compare( fieldName, Qt::CaseInsensitive ) == 0 && + ( item.formationName.compare( formationName, Qt::CaseInsensitive ) == 0 || + item.formationName == formationWildCard ) && + item.faciesName.compare( faciesName, Qt::CaseInsensitive ) == 0 ) { matchingFacies.push_back( item ); } diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticProperties.h b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticProperties.h index 12721b5983..46852da313 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticProperties.h +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticProperties.h @@ -81,5 +81,20 @@ private: caf::PdmChildField m_scalings; caf::PdmField m_showScaledProperties; - std::map m_properties; + struct CaseInsensitiveFaciesKeyCompare + { + bool operator()( const FaciesKey& f1, const FaciesKey& f2 ) const + { + int fieldCompare = std::get<0>( f1 ).compare( std::get<0>( f2 ), Qt::CaseInsensitive ); + if ( fieldCompare != 0 ) return fieldCompare < 0; + + int formationCompare = std::get<1>( f1 ).compare( std::get<1>( f2 ), Qt::CaseInsensitive ); + if ( formationCompare != 0 ) return formationCompare < 0; + + int faciesCompare = std::get<2>( f1 ).compare( std::get<2>( f2 ), Qt::CaseInsensitive ); + return faciesCompare < 0; + } + }; + + std::map m_properties; };