mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#829 Eclipse: Set default legend mapping and color range when selecting a category result
This commit is contained in:
@@ -191,6 +191,32 @@ void RimEclipseCellColors::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOr
|
||||
uiTreeOrdering.setForgetRemainingFields(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseCellColors::updateLegendCategorySettings()
|
||||
{
|
||||
changeLegendConfig(this->resultVariable());
|
||||
|
||||
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