mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#507) Picking unit name from LAS file in curve's update method
This commit is contained in:
parent
0f1321bc73
commit
81b973a74c
@ -99,7 +99,6 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked)
|
||||
curve->setColor(curveColor);
|
||||
curve->setWellPath(wellPath);
|
||||
curve->setWellLogChannelName(wellLog->name());
|
||||
curve->setWellLogChannelUnit(wellLogDataFile->wellLogChannelUnit(wellLog->name()));
|
||||
|
||||
curve->updatePlotData();
|
||||
|
||||
|
@ -87,6 +87,8 @@ void RimWellLogFileCurve::updatePlotData()
|
||||
{
|
||||
m_plotCurve->setSamples(NULL, NULL, 0);
|
||||
}
|
||||
|
||||
m_plotCurve->setTitle(createCurveName());
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -116,14 +118,6 @@ void RimWellLogFileCurve::setWellLogChannelName(const QString& name)
|
||||
m_wellLogChannnelName = name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogFileCurve::setWellLogChannelUnit(const QString& name)
|
||||
{
|
||||
m_wellLogChannnelUnit = name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -219,7 +213,7 @@ QList<caf::PdmOptionItemInfo> RimWellLogFileCurve::calculateValueOptions(const c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellLogFileCurve::createCurveName()
|
||||
{
|
||||
if (m_wellPath())
|
||||
if (m_wellPath)
|
||||
{
|
||||
QString txt;
|
||||
|
||||
@ -227,9 +221,15 @@ QString RimWellLogFileCurve::createCurveName()
|
||||
txt += " : ";
|
||||
txt += m_wellLogChannnelName;
|
||||
|
||||
if (!m_wellLogChannnelUnit().isEmpty())
|
||||
RimWellLogFile* logFileInfo = m_wellPath->m_wellLogFile;
|
||||
RigWellLogFile* wellLogFile = logFileInfo ? logFileInfo->wellLogFile() : NULL;
|
||||
if (wellLogFile)
|
||||
{
|
||||
txt += QString(" [%1]").arg(m_wellLogChannnelUnit);
|
||||
QString unitName = wellLogFile->wellLogChannelUnit(m_wellLogChannnelName);
|
||||
if (!unitName.isEmpty())
|
||||
{
|
||||
txt += QString(" [%1]").arg(wellLogFile->wellLogChannelUnit(m_wellLogChannnelName));
|
||||
}
|
||||
}
|
||||
|
||||
return txt;
|
||||
|
@ -43,7 +43,6 @@ public:
|
||||
|
||||
void setWellPath(RimWellPath* wellPath);
|
||||
void setWellLogChannelName(const QString& name);
|
||||
void setWellLogChannelUnit(const QString& name);
|
||||
|
||||
// Overrides from RimWellLogPlotCurve
|
||||
virtual void updatePlotData();
|
||||
|
Loading…
Reference in New Issue
Block a user