mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1634 Calculating smallest positive value and using this value for the min range value when using logarithmic scale
This commit is contained in:
@@ -247,14 +247,17 @@ void RimStimPlanColors::updateLegendData()
|
||||
{
|
||||
double minValue = HUGE_VAL;
|
||||
double maxValue = -HUGE_VAL;
|
||||
double posClosestToZero = HUGE_VAL;
|
||||
double negClosestToZero = -HUGE_VAL;
|
||||
|
||||
RimFractureTemplateCollection* fracTemplateColl = fractureTemplateCollection();
|
||||
|
||||
fracTemplateColl->computeMinMax(resultName(), unit(), &minValue, &maxValue);
|
||||
fracTemplateColl->computeMinMax(resultName(), unit(), &minValue, &maxValue, &posClosestToZero, &negClosestToZero);
|
||||
|
||||
if (minValue != HUGE_VAL)
|
||||
{
|
||||
legendConfig->setAutomaticRanges(minValue, maxValue, minValue, maxValue);
|
||||
legendConfig->setClosestToZeroValues(posClosestToZero, negClosestToZero, posClosestToZero, negClosestToZero);
|
||||
}
|
||||
|
||||
legendConfig->setTitle(cvfqt::Utils::toString(m_resultNameAndUnit()));
|
||||
|
||||
Reference in New Issue
Block a user