#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

@@ -138,7 +138,7 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
}
}
if ( m_isUsingAutoName )
if ( m_isUsingAutoName && m_plotCurve )
{
m_plotCurve->setTitle( createCurveAutoName() );
}
@@ -160,11 +160,14 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
depthType = wellLogPlot->depthType();
}
bool useLogarithmicScale = false;
m_plotCurve->setSamplesFromXValuesAndYValues( this->curveData()->propertyValuesByIntervals(),
this->curveData()->depthValuesByIntervals( depthType, displayUnit ),
useLogarithmicScale );
m_plotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
if ( m_plotCurve )
{
bool useLogarithmicScale = false;
m_plotCurve->setSamplesFromXValuesAndYValues( this->curveData()->propertyValuesByIntervals(),
this->curveData()->depthValuesByIntervals( depthType, displayUnit ),
useLogarithmicScale );
m_plotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
}
}
this->RimPlotCurve::updateCurvePresentation( updateParentPlot );