#1634 Calculating smallest positive value and using this value for the min range value when using logarithmic scale

This commit is contained in:
astridkbjorke
2017-06-30 16:16:27 +02:00
parent d6ae3b4a53
commit 032630f6e9
7 changed files with 25 additions and 10 deletions

View File

@@ -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()));