#1971 WLP: Context command to create a new well log RFT curve from a selected well

This commit is contained in:
Rebecca Cox
2017-10-09 12:03:18 +02:00
parent 18552cf2f6
commit da118ac1da
8 changed files with 196 additions and 23 deletions

View File

@@ -134,6 +134,37 @@ RifEclipseRftAddress RimWellLogRftCurve::rftAddress() const
return RifEclipseRftAddress(m_wellName, m_timeStep, m_wellLogChannelName());
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogRftCurve::setDefaultAddress(QString wellName)
{
RifReaderEclipseRft* reader = rftReader();
if (!reader) return;
bool wellNameHasRftData = false;
std::set<QString> wellNames = reader->wellNames();
for (const QString& wellNameWithRft : wellNames)
{
if (wellName == wellNameWithRft)
{
wellNameHasRftData = true;
m_wellName = wellName;
break;
}
}
if (!wellNameHasRftData) return;
m_wellLogChannelName = RifEclipseRftAddress::PRESSURE;
std::vector<QDateTime> timeSteps = reader->availableTimeSteps(m_wellName, m_wellLogChannelName());
if (timeSteps.size() > 0)
{
m_timeStep = timeSteps[0];
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------