mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
WellLogPlot. Handle multiple well log files in well path
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user