(#438) Added unit to depth axis title. Did some refactoring.

This commit is contained in:
Pål Hagen 2015-09-11 13:22:33 +02:00
parent 7901c3c4bd
commit dce0361660
3 changed files with 24 additions and 2 deletions

View File

@ -418,3 +418,25 @@ RimWellLogPlot::DepthTypeEnum RimWellLogPlot::depthType() const
{
return m_depthType.value();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimWellLogPlot::depthPlotTitle() const
{
QString depthTitle = "Depth";
switch (m_depthType.value())
{
case MEASURED_DEPTH:
depthTitle = "MD";
break;
case TRUE_VERTICAL_DEPTH:
depthTitle = "TVD";
break;
}
depthTitle += " [m]";
return depthTitle;
}

View File

@ -73,6 +73,7 @@ public:
void setVisibleDepthRangeFromContents();
DepthTypeEnum depthType() const;
QString depthPlotTitle() const;
virtual caf::PdmFieldHandle* userDescriptionField() { return &m_userName; }

View File

@ -165,8 +165,7 @@ void RimWellLogPlotTrace::loadDataAndUpdate()
firstAnchestorOrThisOfType(wellLogPlot);
if (wellLogPlot)
{
QString depthTitle = wellLogPlot->depthType() == RimWellLogPlot::MEASURED_DEPTH ? "MD" : "TVD";
m_viewer->setDepthTitle(depthTitle);
m_viewer->setDepthTitle(wellLogPlot->depthPlotTitle());
}
for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx)