#2422 perforations. Update tree view after perforations import

This commit is contained in:
Bjørn Erik Jensen 2018-02-01 09:10:31 +01:00
parent 740baf661c
commit 7131006188

View File

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