Select newest RimWellPath on import of formations and well paths

This commit is contained in:
Rebecca Cox
2017-11-29 08:42:37 +01:00
parent d2e590875d
commit e89d2c0717
4 changed files with 21 additions and 24 deletions

View File

@@ -67,16 +67,11 @@ void RicWellPathFormationsImportFileFeature::onActionTriggered(bool isChecked)
project->createDisplayModelAndRedrawAllViews();
RimOilField* oilField = project->activeOilField();
if (!oilField)
return;
if (!oilField) return;
if (oilField->wellPathCollection->wellPaths().size() > 0)
{
RimWellPath* wellPath = nullptr;
QString wellPathName = oilField->wellPathCollection->newestAddedWellName();
wellPath = oilField->wellPathCollection->wellPathByName(wellPathName);
RimWellPath* wellPath = oilField->wellPathCollection->newestAddedWellPath();
if (wellPath)
{
RiuMainWindow::instance()->selectAsCurrentItem(wellPath);