diff --git a/ApplicationCode/Commands/RicFaciesPropertiesImportTools.cpp b/ApplicationCode/Commands/RicFaciesPropertiesImportTools.cpp index 923bac7b7f..c7ae5a990e 100644 --- a/ApplicationCode/Commands/RicFaciesPropertiesImportTools.cpp +++ b/ApplicationCode/Commands/RicFaciesPropertiesImportTools.cpp @@ -62,6 +62,8 @@ void RicFaciesPropertiesImportTools::importFaciesPropertiesFromFile( const QStri faciesProperties = new RimFaciesProperties; } + faciesProperties->clearFaciesCodeNames(); + for ( auto it : codeNames ) { faciesProperties->setFaciesCodeName( it.first, it.second ); diff --git a/ApplicationCode/ProjectDataModel/StimPlanModel/RimFaciesProperties.cpp b/ApplicationCode/ProjectDataModel/StimPlanModel/RimFaciesProperties.cpp index 40ddefbcd4..6a3abdcc38 100644 --- a/ApplicationCode/ProjectDataModel/StimPlanModel/RimFaciesProperties.cpp +++ b/ApplicationCode/ProjectDataModel/StimPlanModel/RimFaciesProperties.cpp @@ -96,6 +96,15 @@ void RimFaciesProperties::setFaciesCodeName( int code, const QString& name ) m_propertiesTable = generatePropertiesTable(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimFaciesProperties::clearFaciesCodeNames() +{ + m_faciesCodeNames.clear(); + m_propertiesTable = generatePropertiesTable(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/StimPlanModel/RimFaciesProperties.h b/ApplicationCode/ProjectDataModel/StimPlanModel/RimFaciesProperties.h index 41dc5bfef6..7b8614c9cb 100644 --- a/ApplicationCode/ProjectDataModel/StimPlanModel/RimFaciesProperties.h +++ b/ApplicationCode/ProjectDataModel/StimPlanModel/RimFaciesProperties.h @@ -47,6 +47,7 @@ public: void setFilePath( const QString& filePath ); void setFaciesCodeName( int code, const QString& name ); + void clearFaciesCodeNames(); void setEclipseCase( RimEclipseCase* eclipseCase );