Janitor : Use class enum

This commit is contained in:
Magne Sjaastad
2020-08-14 10:41:01 +02:00
parent 07c778280b
commit 523cdc2b7d
22 changed files with 181 additions and 156 deletions

View File

@@ -85,19 +85,22 @@ void RimGeoMechCellColors::updateLegendCategorySettings()
{
if ( this->hasCategoryResult() )
{
legendConfig->setMappingMode( RimRegularLegendConfig::CATEGORY_INTEGER );
legendConfig->setColorLegend( RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::CATEGORY ) );
legendConfig->setMappingMode( RimRegularLegendConfig::MappingType::CATEGORY_INTEGER );
legendConfig->setColorLegend(
RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::CATEGORY ) );
}
else
{
if ( legendConfig->mappingMode() == RimRegularLegendConfig::CATEGORY_INTEGER )
if ( legendConfig->mappingMode() == RimRegularLegendConfig::MappingType::CATEGORY_INTEGER )
{
legendConfig->setMappingMode( RimRegularLegendConfig::LINEAR_CONTINUOUS );
legendConfig->setMappingMode( RimRegularLegendConfig::MappingType::LINEAR_CONTINUOUS );
}
if ( legendConfig->colorLegend() == RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::CATEGORY ) )
if ( legendConfig->colorLegend() ==
RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::CATEGORY ) )
{
legendConfig->setColorLegend( RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::NORMAL ) );
legendConfig->setColorLegend(
RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::NORMAL ) );
}
}
}