#9260 Guard pointer access and update tree view when plot is created

Guard access to plot curve
Update tree view when object is created
Use zoomAll to update x value range
This commit is contained in:
Magne Sjaastad
2022-09-01 10:14:29 +02:00
parent 7f78cb8c89
commit 0a3b42fa80
3 changed files with 12 additions and 16 deletions

View File

@@ -411,16 +411,6 @@ void RicNewWellBoreStabilityPlotFeature::createAnglesTrack( RimWellBoreStability
curve->loadDataAndUpdate( false );
double actualMinValue = minValue, actualMaxValue = maxValue;
curve->xValueRange( &actualMinValue, &actualMaxValue );
while ( maxValue < actualMaxValue )
{
maxValue += angleIncrement;
}
while ( minValue > actualMinValue )
{
minValue -= angleIncrement;
}
maxValue = cvf::Math::clamp( maxValue, angleIncrement, 720.0 );
minValue = cvf::Math::clamp( minValue, 0.0, maxValue - 90.0 );
}