mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#811 Setting default legend type for category results
This commit is contained in:
@@ -75,3 +75,27 @@ void RimGeoMechCellColors::initAfterRead()
|
||||
{
|
||||
updateIconState();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGeoMechCellColors::updateLegendCategorySettings()
|
||||
{
|
||||
if(this->hasCategoryResult())
|
||||
{
|
||||
legendConfig->setMappingMode(RimLegendConfig::CATEGORY_INTEGER);
|
||||
legendConfig->setColorRangeMode(RimLegendConfig::CATEGORY);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(legendConfig->mappingMode() == RimLegendConfig::CATEGORY_INTEGER)
|
||||
{
|
||||
legendConfig->setMappingMode(RimLegendConfig::LINEAR_CONTINUOUS);
|
||||
}
|
||||
|
||||
if(legendConfig->colorRangeMode() == RimLegendConfig::CATEGORY)
|
||||
{
|
||||
legendConfig->setColorRangeMode(RimLegendConfig::NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user