mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1385 Fixed copy view problem, when flow diagnostics result was used.
Also fixed potential other problems due to same cause: resolve must be done before initAfterRead
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "RicPasteFeatureImpl.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
@@ -83,6 +85,8 @@ void RicPasteEclipseViewsFeature::onActionTriggered(bool isChecked)
|
||||
std::vector<caf::PdmPointer<RimEclipseView> > eclipseViews;
|
||||
objectGroup.objectsByType(&eclipseViews);
|
||||
|
||||
RimEclipseView* lastViewCopy = nullptr;
|
||||
|
||||
// Add cases to case group
|
||||
for (size_t i = 0; i < eclipseViews.size(); i++)
|
||||
{
|
||||
@@ -97,16 +101,18 @@ void RicPasteEclipseViewsFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
// Resolve references after reservoir view has been inserted into Rim structures
|
||||
// Intersections referencing a well path/ simulation well requires this
|
||||
// TODO: initAfterReadRecursively can probably be removed
|
||||
rimReservoirView->initAfterReadRecursively();
|
||||
rimReservoirView->resolveReferencesRecursively();
|
||||
rimReservoirView->initAfterReadRecursively();
|
||||
|
||||
rimReservoirView->loadDataAndUpdate();
|
||||
|
||||
caf::PdmDocument::updateUiIconStateRecursively(rimReservoirView);
|
||||
|
||||
eclipseCase->updateConnectedEditors();
|
||||
lastViewCopy = rimReservoirView;
|
||||
}
|
||||
|
||||
if (lastViewCopy) RiuMainWindow::instance()->selectAsCurrentItem(lastViewCopy);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user