#1998 RFT plot. Handle old project files regarding well path and well log files

This commit is contained in:
Bjørn Erik Jensen 2017-10-20 10:17:30 +02:00
parent c3ee28de5f
commit 92f30742ec
4 changed files with 27 additions and 0 deletions

View File

@ -329,6 +329,17 @@ QList<caf::PdmOptionItemInfo> RimWellLogFileCurve::calculateValueOptions(const c
return options;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogFileCurve::initAfterRead()
{
if (m_wellPath->wellLogFiles().size() == 1)
{
m_wellLogFile = m_wellPath->wellLogFiles().front();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -62,6 +62,7 @@ protected:
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "");
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly);
virtual void initAfterRead() override;
protected:
caf::PdmPtrField<RimWellPath*> m_wellPath;

View File

@ -342,6 +342,20 @@ QList<caf::PdmOptionItemInfo> RimWellPath::calculateValueOptions(const caf::PdmF
return options;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPath::initAfterRead()
{
RimWellLogFile* wellLogFile = m_wellLogFile_OBSOLETE();
m_wellLogFile_OBSOLETE = nullptr;
if (wellLogFile != nullptr)
{
m_wellLogFiles.push_back(wellLogFile);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -71,6 +71,7 @@ public:
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
virtual void initAfterRead() override;
QString name() const;
void setName(const QString& name);