mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1971 WLP: Context command to create a new well log RFT curve from a selected well
This commit is contained in:
@@ -366,6 +366,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
|
||||
else if (dynamic_cast<RimEclipseWell*>(uiItem))
|
||||
{
|
||||
commandIds << "RicNewWellLogCurveExtractionFeature";
|
||||
commandIds << "RicNewWellLogRftCurveFeature";
|
||||
commandIds << "RicNewSimWellIntersectionFeature";
|
||||
commandIds << "RicShowWellAllocationPlotFeature";
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -52,6 +52,8 @@ public:
|
||||
void setRftAddress(RifEclipseRftAddress address);
|
||||
RifEclipseRftAddress rftAddress() const;
|
||||
|
||||
void setDefaultAddress(QString wellName);
|
||||
|
||||
protected:
|
||||
// Overrides from RimWellLogPlotCurve
|
||||
virtual QString createCurveAutoName() override;
|
||||
|
||||
Reference in New Issue
Block a user