mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#906 If present, show datum elevation in property editor for a well path
This commit is contained in:
parent
bd69519795
commit
9eb6ae88ff
@ -34,6 +34,7 @@
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QMessageBox>
|
||||
#include <QDateTime>
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellPath, "WellPath");
|
||||
|
||||
@ -74,6 +75,11 @@ RimWellPath::RimWellPath()
|
||||
m_surveyType.xmlCapability()->setIOWritable(false);
|
||||
m_surveyType.xmlCapability()->setIOReadable(false);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_datumElevation, "DatumElevation", "Datum Elevation", "", "", "");
|
||||
m_datumElevation.uiCapability()->setUiReadOnly(true);
|
||||
m_datumElevation.xmlCapability()->setIOWritable(false);
|
||||
m_datumElevation.xmlCapability()->setIOReadable(false);
|
||||
|
||||
CAF_PDM_InitField(&filepath, "WellPathFilepath", QString(""), "Filepath", "", "", "");
|
||||
filepath.uiCapability()->setUiReadOnly(true);
|
||||
CAF_PDM_InitField(&wellPathIndexInFile, "WellPathNumberInFile", -1, "Well Number in file", "", "", "");
|
||||
@ -237,6 +243,7 @@ void RimWellPath::readJsonWellPathFile()
|
||||
// Well path points
|
||||
|
||||
double datumElevation = jsonMap["datumElevation"].toDouble();
|
||||
wellPathGeom->setDatumElevation(datumElevation);
|
||||
|
||||
QList<QVariant> pathList = jsonMap["path"].toList();
|
||||
foreach (QVariant point, pathList)
|
||||
@ -287,6 +294,17 @@ void RimWellPath::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiO
|
||||
ssihubGroup->add(&updateDate);
|
||||
ssihubGroup->add(&updateUser);
|
||||
ssihubGroup->add(&m_surveyType);
|
||||
ssihubGroup->add(&m_datumElevation);
|
||||
|
||||
if (m_wellPath.notNull() && m_wellPath->hasDatumElevation())
|
||||
{
|
||||
m_datumElevation = m_wellPath->datumElevation();
|
||||
m_datumElevation.uiCapability()->setUiHidden(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_datumElevation.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -99,6 +99,7 @@ private:
|
||||
caf::PdmField<QString> updateUser;
|
||||
|
||||
caf::PdmField<QString> m_surveyType;
|
||||
caf::PdmField<double> m_datumElevation;
|
||||
|
||||
cvf::ref<RigWellPath> m_wellPath;
|
||||
cvf::ref<RivWellPathPartMgr> m_wellPathPartMgr;
|
||||
|
Loading…
Reference in New Issue
Block a user