(#704) Do not delete simulation wells as part of paste operation

Sync of wells happens in loadDataAndUpdate ->
syncronizeWellsWithResults, and potentially missing wells will be
deleted. LoadDataAndUpdate must also happen after references are
resolved
This commit is contained in:
Magne Sjaastad 2015-12-11 10:20:15 +01:00
parent c0d08dd37f
commit 6b070c6b12

View File

@ -93,12 +93,7 @@ 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 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/ simulation well requires this
@ -106,6 +101,8 @@ void RicPasteEclipseViewsFeature::onActionTriggered(bool isChecked)
rimReservoirView->initAfterReadRecursively();
rimReservoirView->resolveReferencesRecursively();
rimReservoirView->loadDataAndUpdate();
caf::PdmDocument::updateUiIconStateRecursively(rimReservoirView);
eclipseCase->updateConnectedEditors();