#8277 StimPlan : Use case insensitive string compare for facies and formations

This commit is contained in:
Magne Sjaastad 2021-11-12 11:33:19 +01:00
parent 5545aff4b5
commit 6940e588b6
2 changed files with 4 additions and 3 deletions

View File

@ -99,8 +99,9 @@ double RimElasticPropertyScalingCollection::getScaling( const QString&
{
for ( const RimElasticPropertyScaling* scaling : m_elasticPropertyScalings )
{
if ( scaling->property() == property && scaling->formation() == formationName &&
scaling->facies() == faciesName && scaling->isChecked() )
if ( scaling->property() == property &&
( scaling->formation().compare( formationName, Qt::CaseInsensitive ) == 0 ) &&
( scaling->facies().compare( faciesName, Qt::CaseInsensitive ) == 0 ) && scaling->isChecked() )
{
return scaling->scale();
}

View File

@ -1725,7 +1725,7 @@ double RimStimPlanModel::findFaciesValue( const RimColorLegend& colorLegend, con
{
for ( auto item : colorLegend.colorLegendItems() )
{
if ( item->categoryName() == name ) return item->categoryValue();
if ( item->categoryName().compare( name, Qt::CaseInsensitive ) == 0 ) return item->categoryValue();
}
return std::numeric_limits<double>::infinity();