Merge perforation updates into dev #2422

This commit is contained in:
Magne Sjaastad
2018-02-01 13:05:00 +01:00
@@ -71,6 +71,7 @@ void RicWellPathImportPerforationIntervalsFeature::onActionTriggered(bool isChec
std::map<QString, std::vector<RifPerforationInterval> > perforationIntervals = RifPerforationIntervalReader::readPerforationIntervals(wellPathFilePaths); std::map<QString, std::vector<RifPerforationInterval> > perforationIntervals = RifPerforationIntervalReader::readPerforationIntervals(wellPathFilePaths);
RimPerforationInterval* lastPerforationInterval = nullptr;
for (auto& entry : perforationIntervals) for (auto& entry : perforationIntervals)
{ {
RimWellPath* wellPath = wellPathCollection->tryFindMatchingWellPath(entry.first); RimWellPath* wellPath = wellPathCollection->tryFindMatchingWellPath(entry.first);
@@ -95,14 +96,21 @@ void RicWellPathImportPerforationIntervalsFeature::onActionTriggered(bool isChec
perforationInterval->setDate(interval.date); perforationInterval->setDate(interval.date);
} }
wellPath->perforationIntervalCollection()->appendPerforation(perforationInterval); wellPath->perforationIntervalCollection()->appendPerforation(perforationInterval);
lastPerforationInterval = perforationInterval;
} }
} }
} }
wellPathCollection->uiCapability()->updateConnectedEditors();
if (app->project()) if (app->project())
{ {
app->project()->createDisplayModelAndRedrawAllViews(); app->project()->createDisplayModelAndRedrawAllViews();
} }
if (lastPerforationInterval)
{
RiuMainWindow::instance()->selectAsCurrentItem(lastPerforationInterval);
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------