From 6940e588b60b016c4adf04130f029c147ce939df Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 12 Nov 2021 11:33:19 +0100 Subject: [PATCH] #8277 StimPlan : Use case insensitive string compare for facies and formations --- .../StimPlanModel/RimElasticPropertyScalingCollection.cpp | 5 +++-- .../ProjectDataModel/StimPlanModel/RimStimPlanModel.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticPropertyScalingCollection.cpp b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticPropertyScalingCollection.cpp index 8800a5c602..0a01f64e6d 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticPropertyScalingCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimElasticPropertyScalingCollection.cpp @@ -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(); } diff --git a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModel.cpp b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModel.cpp index ec6374ec09..9e2607eae4 100644 --- a/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModel.cpp +++ b/ApplicationLibCode/ProjectDataModel/StimPlanModel/RimStimPlanModel.cpp @@ -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::infinity();