mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2261 Well Paths: Change newestAddedWellPath to mostRecentlyUpdatedWellPath
This commit is contained in:
@@ -101,7 +101,7 @@ RimWellPathCollection::RimWellPathCollection()
|
||||
|
||||
m_wellPathImporter = new RifWellPathImporter;
|
||||
m_wellPathFormationsImporter = new RifWellPathFormationsImporter;
|
||||
m_newestAddedWellPath = nullptr;
|
||||
m_mostRecentlyUpdatedWellPath = nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -268,23 +268,20 @@ void RimWellPathCollection::readAndAddWellPaths(std::vector<RimWellPath*>& wellP
|
||||
// Let name from well path file override name from well log file
|
||||
existingWellPath->setName(wellPath->name());
|
||||
|
||||
m_mostRecentlyUpdatedWellPath = existingWellPath;
|
||||
delete wellPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
wellPath->wellPathColor = cvf::Color3f(interpolatedWellColors[wpIdx]);
|
||||
wellPath->setUnitSystem(findUnitSystemForWellPath(wellPath));
|
||||
m_mostRecentlyUpdatedWellPath = wellPath;
|
||||
wellPaths.push_back(wellPath);
|
||||
}
|
||||
|
||||
progress.incrementProgress();
|
||||
}
|
||||
|
||||
if (!wellPaths.empty())
|
||||
{
|
||||
m_newestAddedWellPath = wellPaths[wellPaths.size() - 1];
|
||||
}
|
||||
|
||||
this->sortWellsByName();
|
||||
}
|
||||
|
||||
@@ -360,7 +357,7 @@ void RimWellPathCollection::addWellPathFormations(const QStringList& filePaths)
|
||||
|
||||
QString wellFormationsCount = QString("%1").arg(it->second->formationNamesCount());
|
||||
|
||||
m_newestAddedWellPath = wellPath;
|
||||
m_mostRecentlyUpdatedWellPath = wellPath;
|
||||
|
||||
outputMessage += it->first + "\t\t";
|
||||
outputMessage += wellPath->name() + " \t\t\t";
|
||||
@@ -520,9 +517,9 @@ void RimWellPathCollection::deleteAllWellPaths()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPath* RimWellPathCollection::newestAddedWellPath()
|
||||
RimWellPath* RimWellPathCollection::mostRecentlyUpdatedWellPath()
|
||||
{
|
||||
return m_newestAddedWellPath;
|
||||
return m_mostRecentlyUpdatedWellPath;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user