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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user