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:
parent
3cefc2f7a8
commit
5e6018acb7
@ -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);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include "RicPasteFeatureImpl.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
|
||||
@ -77,6 +79,8 @@ void RicPasteGeoMechViewsFeature::onActionTriggered(bool isChecked)
|
||||
std::vector<caf::PdmPointer<RimGeoMechView> > geomViews;
|
||||
objectGroup.objectsByType(&geomViews);
|
||||
|
||||
RimGeoMechView* lastViewCopy = nullptr;
|
||||
|
||||
// Add cases to case group
|
||||
for (size_t i = 0; i < geomViews.size(); i++)
|
||||
{
|
||||
@ -89,15 +93,19 @@ void RicPasteGeoMechViewsFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
// Resolve references after reservoir view has been inserted into Rim structures
|
||||
// Intersections referencing a well path requires this
|
||||
rimReservoirView->initAfterReadRecursively();
|
||||
rimReservoirView->resolveReferencesRecursively();
|
||||
rimReservoirView->initAfterReadRecursively();
|
||||
|
||||
caf::PdmDocument::updateUiIconStateRecursively(rimReservoirView);
|
||||
|
||||
rimReservoirView->loadDataAndUpdate();
|
||||
|
||||
geomCase->updateConnectedEditors();
|
||||
|
||||
lastViewCopy = rimReservoirView;
|
||||
}
|
||||
|
||||
if (lastViewCopy) RiuMainWindow::instance()->selectAsCurrentItem(lastViewCopy);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -152,10 +152,8 @@ void RicExportMultipleSnapshotsFeature::exportMultipleSnapshots(const QString& f
|
||||
copyOfGeoMechView->setGeoMechCase(geomCase);
|
||||
|
||||
// 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
|
||||
copyOfGeoMechView->initAfterReadRecursively();
|
||||
copyOfGeoMechView->resolveReferencesRecursively();
|
||||
copyOfGeoMechView->initAfterReadRecursively();
|
||||
|
||||
copyOfGeoMechView->loadDataAndUpdate();
|
||||
|
||||
|
@ -190,10 +190,8 @@ RimEclipseView* RimEclipseCase::createCopyAndAddView(const RimEclipseView* sourc
|
||||
reservoirViews().push_back(rimEclipseView);
|
||||
|
||||
// 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
|
||||
rimEclipseView->initAfterReadRecursively();
|
||||
rimEclipseView->resolveReferencesRecursively();
|
||||
rimEclipseView->initAfterReadRecursively();
|
||||
|
||||
return rimEclipseView;
|
||||
}
|
||||
|
@ -672,7 +672,7 @@ RigFlowDiagResultAddress RimEclipseResultDefinition::flowDiagResAddress() const
|
||||
}
|
||||
else
|
||||
{
|
||||
RimFlowDiagSolution* flowSol = m_flowSolutionUiField();
|
||||
RimFlowDiagSolution* flowSol = m_flowSolution();
|
||||
if (flowSol)
|
||||
{
|
||||
std::vector<QString> tracerNames = flowSol->tracerNames();
|
||||
|
Loading…
Reference in New Issue
Block a user