WellLogPlot. Handle multiple well log files in well path

This commit is contained in:
Bjørn Erik Jensen
2017-10-23 19:09:08 +02:00
parent dc82888ede
commit 34d77d2733
3 changed files with 18 additions and 2 deletions

View File

@@ -99,6 +99,7 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked)
curve->setWellPath(wellPath); curve->setWellPath(wellPath);
curve->setWellLogChannelName(wellLog->name()); curve->setWellLogChannelName(wellLog->name());
curve->setWellLogFile(wellLogFile);
curve->loadDataAndUpdate(true); curve->loadDataAndUpdate(true);
} }

View File

@@ -236,8 +236,8 @@ void RimWellLogFileCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Curve Data"); caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Curve Data");
curveDataGroup->add(&m_wellPath); curveDataGroup->add(&m_wellPath);
curveDataGroup->add(&m_wellLogChannnelName);
curveDataGroup->add(&m_wellLogFile); curveDataGroup->add(&m_wellLogFile);
curveDataGroup->add(&m_wellLogChannnelName);
caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Appearance"); caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Appearance");
RimPlotCurve::appearanceUiOrdering(*appearanceGroup); RimPlotCurve::appearanceUiOrdering(*appearanceGroup);
@@ -313,11 +313,14 @@ QList<caf::PdmOptionItemInfo> RimWellLogFileCurve::calculateValueOptions(const c
if (fieldNeedingOptions == &m_wellLogFile) if (fieldNeedingOptions == &m_wellLogFile)
{ {
if (m_wellPath() && m_wellPath->wellLogFiles().size() > 0) if (m_wellPath() && m_wellPath->wellLogFiles().size() > 0)
{ {
bool isRft = isInRftPlot();
for (RimWellLogFile* const wellLogFile : m_wellPath->wellLogFiles()) for (RimWellLogFile* const wellLogFile : m_wellPath->wellLogFiles())
{ {
if (RimWellRftPlot::hasPressureData(wellLogFile)) if (!isRft || RimWellRftPlot::hasPressureData(wellLogFile))
{ {
QFileInfo fileInfo(wellLogFile->fileName()); QFileInfo fileInfo(wellLogFile->fileName());
options.push_back(caf::PdmOptionItemInfo(fileInfo.baseName(), wellLogFile)); options.push_back(caf::PdmOptionItemInfo(fileInfo.baseName(), wellLogFile));
@@ -340,6 +343,16 @@ void RimWellLogFileCurve::initAfterRead()
} }
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellLogFileCurve::isInRftPlot() const
{
RimWellRftPlot* rftPlot;
firstAncestorOrThisOfType(rftPlot);
return rftPlot != nullptr;
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -64,6 +64,8 @@ protected:
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly); virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly);
virtual void initAfterRead() override; virtual void initAfterRead() override;
bool isInRftPlot() const;
protected: protected:
caf::PdmPtrField<RimWellPath*> m_wellPath; caf::PdmPtrField<RimWellPath*> m_wellPath;
caf::PdmPtrField<RimWellLogFile*> m_wellLogFile; caf::PdmPtrField<RimWellLogFile*> m_wellLogFile;