(#703) Make sure simulation wells are read before resolving references

This commit is contained in:
Magne Sjaastad 2015-12-10 23:09:33 +01:00
parent 061de66597
commit 34862d39b0

View File

@ -93,20 +93,21 @@ void RicPasteEclipseViewsFeature::onActionTriggered(bool isChecked)
rimReservoirView->name = nameOfCopy;
eclipseCase->reservoirViews().push_back(rimReservoirView);
// Delete all wells to be able to copy/paste between cases, as the wells differ between cases
// Delete all wells to be able to copy/paste between cases, as the wells can be different between cases
// Wells are read from file in loadDataAndUpdate -> syncronizeWellsWithResults
rimReservoirView->wellCollection()->wells().deleteAllChildObjects();
rimReservoirView->setEclipseCase(eclipseCase);
rimReservoirView->loadDataAndUpdate();
// Resolve references after reservoir view has been inserted into Rim structures
// Intersections referencing a well path requires this
// Intersections referencing a well path/ simulation well requires this
// TODO: initAfterReadRecursively can probably be removed
rimReservoirView->initAfterReadRecursively();
rimReservoirView->resolveReferencesRecursively();
caf::PdmDocument::updateUiIconStateRecursively(rimReservoirView);
rimReservoirView->loadDataAndUpdate();
eclipseCase->updateConnectedEditors();
}
}