Use rock type colors when "Facies" is imported

This commit is contained in:
Magne Sjaastad
2023-05-26 11:26:22 +02:00
committed by GitHub
parent f17c02ce86
commit b7420ebc70
7 changed files with 120 additions and 79 deletions

View File

@@ -84,12 +84,12 @@ void RimColorLegendCollection::deleteCustomColorLegends()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimColorLegend* RimColorLegendCollection::createColorLegend( const QString& name, const std::vector<std::pair<int, QString>>& valuesAndNames )
RimColorLegend* RimColorLegendCollection::createColorLegend( const QString& colorLegendName, const std::map<int, QString>& valuesAndNames )
{
auto colors = RiaColorTables::categoryPaletteColors().color3ubArray();
auto colorLegend = new RimColorLegend();
colorLegend->setColorLegendName( name );
colorLegend->setColorLegendName( colorLegendName );
int colorIndex = 0;
for ( const auto& [value, name] : valuesAndNames )
{

View File

@@ -47,7 +47,7 @@ public:
bool isStandardColorLegend( RimColorLegend* colorLegend );
void deleteCustomColorLegends();
RimColorLegend* createColorLegend( const QString& name, const std::vector<std::pair<int, QString>>& valuesAndNames );
RimColorLegend* createColorLegend( const QString& colorLegendName, const std::map<int, QString>& valuesAndNames );
void deleteColorLegend( int caseId, const QString& resultName );
void setDefaultColorLegendForResult( int caseId, const QString& resultName, RimColorLegend* colorLegend );