Well Log Plot: Make sure curves with constant property value is visible

This commit is contained in:
Magne Sjaastad 2022-09-21 08:49:02 +02:00
parent 0eb0101390
commit f1139f5f14

View File

@ -2159,6 +2159,19 @@ std::pair<double, double> RimWellLogTrack::extendMinMaxRange( double minValue, d
auto modifiedMax = maxValue;
auto range = std::fabs( maxValue - minValue );
if ( range < 1e-6 )
{
// If min and max are equal, the curve is not visible. Make sure the range is larger than zero.
if ( maxValue != 0.0 )
{
range = maxValue * 0.01;
}
else
{
range = 1.0;
}
}
modifiedMax += factor * range;
auto candidateMinValue = minValue - factor * range;