#2261 Well Paths: Change newestAddedWellPath to mostRecentlyUpdatedWellPath

This commit is contained in:
Rebecca Cox
2018-01-29 11:24:12 +01:00
parent 438ee340e3
commit d67e1a7d13
4 changed files with 10 additions and 13 deletions

View File

@@ -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;
}
//--------------------------------------------------------------------------------------------------