mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
@@ -91,7 +91,6 @@ RimWellPath::RimWellPath()
|
||||
m_wellLogFile.uiCapability()->setUiHidden(true);
|
||||
|
||||
m_wellPath = NULL;
|
||||
m_project = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +147,9 @@ RivWellPathPartMgr* RimWellPath::partMgr()
|
||||
{
|
||||
if (m_wellPathPartMgr.isNull())
|
||||
{
|
||||
m_wellPathPartMgr = new RivWellPathPartMgr(m_wellPathCollection, this);
|
||||
RimWellPathCollection* wpColl;
|
||||
this->firstAnchestorOrThisOfType(wpColl);
|
||||
if (wpColl) m_wellPathPartMgr = new RivWellPathPartMgr(wpColl, this);
|
||||
}
|
||||
|
||||
return m_wellPathPartMgr.p();
|
||||
@@ -161,7 +162,10 @@ RivWellPathPartMgr* RimWellPath::partMgr()
|
||||
void RimWellPath::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
partMgr()->scheduleGeometryRegen();
|
||||
if (m_project) m_project->createDisplayModelAndRedrawAllViews();
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAnchestorOrThisOfType(proj);
|
||||
if (proj) proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +181,7 @@ caf::PdmFieldHandle* RimWellPath::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Read JSON or ascii file containing well path data
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPath::readWellPathFile(QString* errorMessage)
|
||||
bool RimWellPath::readWellPathFile(QString* errorMessage, RifWellPathAsciiFileReader* asciiReader)
|
||||
{
|
||||
QFileInfo fileInf(filepath());
|
||||
|
||||
@@ -189,7 +193,7 @@ bool RimWellPath::readWellPathFile(QString* errorMessage)
|
||||
}
|
||||
else
|
||||
{
|
||||
this->readAsciiWellPathFile();
|
||||
this->readAsciiWellPathFile(asciiReader);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -254,9 +258,11 @@ void RimWellPath::readJsonWellPathFile()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::readAsciiWellPathFile()
|
||||
void RimWellPath::readAsciiWellPathFile(RifWellPathAsciiFileReader* asciiReader)
|
||||
{
|
||||
RifWellPathAsciiFileReader::WellData wpData = m_wellPathCollection->asciiFileReader()->readWellData(filepath(), wellPathIndexInFile());
|
||||
CVF_ASSERT(asciiReader);
|
||||
|
||||
RifWellPathAsciiFileReader::WellData wpData = asciiReader->readWellData(filepath(), wellPathIndexInFile());
|
||||
this->name = wpData.m_name;
|
||||
|
||||
setWellPathGeometry(wpData.m_wellPathGeometry.p());
|
||||
|
||||
Reference in New Issue
Block a user