mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix crash in WBS curves when rkb diff is 0
This commit is contained in:
parent
e0fd47ef6e
commit
24d58e3a98
@ -350,9 +350,10 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
|||||||
isUsingPseudoLength = false;
|
isUsingPseudoLength = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_qwtPlotCurve->setSamples( curveData()->xPlotValues().data(),
|
std::vector<double> xPlotValues = curveData()->xPlotValues();
|
||||||
curveData()->depthPlotValues( depthType, displayUnit ).data(),
|
std::vector<double> depthPlotValues = curveData()->depthPlotValues( depthType, displayUnit );
|
||||||
static_cast<int>( curveData()->xPlotValues().size() ) );
|
CAF_ASSERT( xPlotValues.size() == depthPlotValues.size() );
|
||||||
|
m_qwtPlotCurve->setSamples( xPlotValues.data(), depthPlotValues.data(), static_cast<int>( xPlotValues.size() ) );
|
||||||
|
|
||||||
m_qwtPlotCurve->setLineSegmentStartStopIndices( curveData()->polylineStartStopIndices() );
|
m_qwtPlotCurve->setLineSegmentStartStopIndices( curveData()->polylineStartStopIndices() );
|
||||||
|
|
||||||
|
@ -148,28 +148,25 @@ std::vector<double> RigWellLogCurveData::depths( RiaDefines::DepthTypeEnum depth
|
|||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_rkbDiff != 0.0 )
|
if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB &&
|
||||||
|
m_depths.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) )
|
||||||
{
|
{
|
||||||
if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB &&
|
std::vector<double> tvds = depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH );
|
||||||
m_depths.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) )
|
for ( double& tvdValue : tvds )
|
||||||
{
|
{
|
||||||
std::vector<double> tvds = depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH );
|
tvdValue += m_rkbDiff;
|
||||||
for ( double& tvdValue : tvds )
|
|
||||||
{
|
|
||||||
tvdValue += m_rkbDiff;
|
|
||||||
}
|
|
||||||
return tvds;
|
|
||||||
}
|
}
|
||||||
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH &&
|
return tvds;
|
||||||
m_depths.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) )
|
}
|
||||||
|
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH &&
|
||||||
|
m_depths.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) )
|
||||||
|
{
|
||||||
|
std::vector<double> tvds = depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB );
|
||||||
|
for ( double& tvdValue : tvds )
|
||||||
{
|
{
|
||||||
std::vector<double> tvds = depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB );
|
tvdValue -= m_rkbDiff;
|
||||||
for ( double& tvdValue : tvds )
|
|
||||||
{
|
|
||||||
tvdValue -= m_rkbDiff;
|
|
||||||
}
|
|
||||||
return tvds;
|
|
||||||
}
|
}
|
||||||
|
return tvds;
|
||||||
}
|
}
|
||||||
return std::vector<double>();
|
return std::vector<double>();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user