mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#435) Adding well log to existing well if well names are the same
This commit is contained in:
@@ -210,11 +210,14 @@ void RimWellPathCollection::addWellLogs(const QStringList& filePaths)
|
|||||||
RimWellLasFileInfo* logFileInfo = RimWellPath::readWellLogFile(filePath);
|
RimWellLasFileInfo* logFileInfo = RimWellPath::readWellLogFile(filePath);
|
||||||
if (logFileInfo)
|
if (logFileInfo)
|
||||||
{
|
{
|
||||||
// TODO: Check for existing well paths and add log to correct well path if existing
|
RimWellPath* wellPath = wellPathByName(logFileInfo->wellName());
|
||||||
|
if (!wellPath)
|
||||||
|
{
|
||||||
|
RimWellPath* wellPath = new RimWellPath();
|
||||||
|
wellPath->setCollection(this);
|
||||||
|
wellPaths.push_back(wellPath);
|
||||||
|
}
|
||||||
|
|
||||||
RimWellPath* wellPath = new RimWellPath();
|
|
||||||
wellPath->setCollection(this);
|
|
||||||
wellPaths.push_back(wellPath);
|
|
||||||
wellPath->setLogFileInfo(logFileInfo);
|
wellPath->setLogFileInfo(logFileInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -266,6 +269,22 @@ void RimWellPathCollection::updateFilePathsFromProjectPath()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimWellPath* RimWellPathCollection::wellPathByName(const QString& wellPathName) const
|
||||||
|
{
|
||||||
|
for (size_t wellPathIdx = 0; wellPathIdx < wellPaths.size(); wellPathIdx++)
|
||||||
|
{
|
||||||
|
if (wellPaths[wellPathIdx]->name() == wellPathName)
|
||||||
|
{
|
||||||
|
return wellPaths[wellPathIdx];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ public:
|
|||||||
void addWellPaths(QStringList filePaths);
|
void addWellPaths(QStringList filePaths);
|
||||||
RimWellPathAsciiFileReader* asciiFileReader() {return m_asciiFileReader;}
|
RimWellPathAsciiFileReader* asciiFileReader() {return m_asciiFileReader;}
|
||||||
|
|
||||||
|
RimWellPath* wellPathByName(const QString& wellPathName) const;
|
||||||
void addWellLogs(const QStringList& filePaths);
|
void addWellLogs(const QStringList& filePaths);
|
||||||
|
|
||||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||||
|
|||||||
Reference in New Issue
Block a user