mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
@@ -411,16 +411,6 @@ void RicNewWellBoreStabilityPlotFeature::createAnglesTrack( RimWellBoreStability
|
|||||||
|
|
||||||
curve->loadDataAndUpdate( false );
|
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 );
|
maxValue = cvf::Math::clamp( maxValue, angleIncrement, 720.0 );
|
||||||
minValue = cvf::Math::clamp( minValue, 0.0, maxValue - 90.0 );
|
minValue = cvf::Math::clamp( minValue, 0.0, maxValue - 90.0 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ RimWellBoreStabilityPlot*
|
|||||||
QString( "Well Bore Stability Plot %1" ).arg( wellLogPlotCollection()->wellLogPlots().size() ) );
|
QString( "Well Bore Stability Plot %1" ).arg( wellLogPlotCollection()->wellLogPlots().size() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wellLogPlotColl->updateConnectedEditors();
|
||||||
|
|
||||||
if ( showAfterCreation )
|
if ( showAfterCreation )
|
||||||
{
|
{
|
||||||
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow();
|
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow();
|
||||||
@@ -242,6 +244,7 @@ void RicNewWellLogPlotFeatureImpl::updateAfterCreation( RimDepthTrackPlot* plot
|
|||||||
{
|
{
|
||||||
CVF_ASSERT( plot );
|
CVF_ASSERT( plot );
|
||||||
plot->loadDataAndUpdate();
|
plot->loadDataAndUpdate();
|
||||||
|
plot->zoomAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_isUsingAutoName )
|
if ( m_isUsingAutoName && m_plotCurve )
|
||||||
{
|
{
|
||||||
m_plotCurve->setTitle( createCurveAutoName() );
|
m_plotCurve->setTitle( createCurveAutoName() );
|
||||||
}
|
}
|
||||||
@@ -160,11 +160,14 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
depthType = wellLogPlot->depthType();
|
depthType = wellLogPlot->depthType();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool useLogarithmicScale = false;
|
if ( m_plotCurve )
|
||||||
m_plotCurve->setSamplesFromXValuesAndYValues( this->curveData()->propertyValuesByIntervals(),
|
{
|
||||||
this->curveData()->depthValuesByIntervals( depthType, displayUnit ),
|
bool useLogarithmicScale = false;
|
||||||
useLogarithmicScale );
|
m_plotCurve->setSamplesFromXValuesAndYValues( this->curveData()->propertyValuesByIntervals(),
|
||||||
m_plotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
|
this->curveData()->depthValuesByIntervals( depthType, displayUnit ),
|
||||||
|
useLogarithmicScale );
|
||||||
|
m_plotCurve->setLineSegmentStartStopIndices( this->curveData()->polylineStartStopIndices() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->RimPlotCurve::updateCurvePresentation( updateParentPlot );
|
this->RimPlotCurve::updateCurvePresentation( updateParentPlot );
|
||||||
|
|||||||
Reference in New Issue
Block a user