mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Well Log Plot: Make sure curves with constant property value is visible
This commit is contained in:
parent
0eb0101390
commit
f1139f5f14
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user