Select last imported wellPath on import, not last wellPath in collection

This commit is contained in:
Rebecca Cox
2017-11-13 07:55:22 +01:00
parent 3e40331c5b
commit a4484579e2
3 changed files with 19 additions and 2 deletions
@@ -96,6 +96,7 @@ RimWellPathCollection::RimWellPathCollection()
wellPaths.uiCapability()->setUiHidden(true);
m_wellPathImporter = new RifWellPathImporter;
m_newestAddedWellName = QString();
}
@@ -273,6 +274,11 @@ void RimWellPathCollection::readAndAddWellPaths(std::vector<RimWellPath*>& wellP
progress.incrementProgress();
}
if (!wellPathArray.empty())
{
m_newestAddedWellName = wellPathArray.back()->name();
}
this->sortWellsByName();
}