(#538) Added depth unit and conversion between meter and feet

This commit is contained in:
Magne Sjaastad
2015-12-02 13:39:16 +01:00
parent fe261560bd
commit d18e8f7bd3
7 changed files with 121 additions and 10 deletions

View File

@@ -265,7 +265,16 @@ void RimWellLogExtractionCurve::updatePlotData()
}
}
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->depthPlotValues().data(), static_cast<int>(m_curveData->xPlotValues().size()));
RimDefines::DepthUnitType displayUnit = RimDefines::UNIT_METER;
RimWellLogPlot* wellLogPlot;
firstAnchestorOrThisOfType(wellLogPlot);
if (wellLogPlot)
{
displayUnit = wellLogPlot->depthUnit();
}
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->depthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
zoomAllOwnerTrackAndPlot();