(#538) Display correct unit in curve name

This commit is contained in:
Magne Sjaastad
2015-12-02 14:21:22 +01:00
parent de14b93f6b
commit a215e080cc
3 changed files with 18 additions and 5 deletions

View File

@@ -263,7 +263,11 @@ QString RimWellLogFileCurve::createCurveName()
RigWellLogFile* wellLogFile = logFileInfo ? logFileInfo->wellLogFile() : NULL;
if (wellLogFile)
{
QString unitName = wellLogFile->wellLogChannelUnitString(m_wellLogChannnelName);
RimWellLogPlot* wellLogPlot;
firstAnchestorOrThisOfType(wellLogPlot);
CVF_ASSERT(wellLogPlot);
QString unitName = wellLogFile->wellLogChannelUnitString(m_wellLogChannnelName, wellLogPlot->depthUnit());
if (!unitName.isEmpty())
{
txt += QString(" [%1]").arg(unitName);