mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-07 14:43:10 -06:00
#3816 Annotations : Assert if resolve of PdmPtrField fails
This commit is contained in:
parent
aa19715c40
commit
af18e30ac6
@ -157,8 +157,13 @@ RimContourMapView* RicNewContourMapViewFeature::create2dContourMapFrom3dView(Rim
|
||||
contourMap->setName(QString("Contour Map %1").arg(i + 1));
|
||||
eclipseCase->contourMapCollection()->push_back(contourMap);
|
||||
|
||||
contourMap->syncronizeLocalAnnotationsFromGlobal();
|
||||
|
||||
// Resolve references after contour map has been inserted into Rim structures
|
||||
contourMap->resolveReferencesRecursively();
|
||||
std::vector<caf::PdmFieldHandle*> fieldsWithFailingResolve;
|
||||
contourMap->resolveReferencesRecursively(&fieldsWithFailingResolve);
|
||||
CVF_ASSERT(fieldsWithFailingResolve.empty());
|
||||
|
||||
contourMap->initAfterReadRecursively();
|
||||
|
||||
return contourMap;
|
||||
|
@ -847,16 +847,7 @@ void RimEclipseView::onLoadDataAndUpdate()
|
||||
|
||||
syncronizeWellsWithResults();
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj && proj->activeOilField())
|
||||
{
|
||||
RimAnnotationCollection* annotColl = proj->activeOilField()->annotationCollection();
|
||||
if (annotColl && annotationCollection())
|
||||
{
|
||||
annotationCollection()->onGlobalCollectionChanged(annotColl);
|
||||
}
|
||||
}
|
||||
|
||||
syncronizeLocalAnnotationsFromGlobal();
|
||||
|
||||
{
|
||||
// Update simulation well fractures after well cell results are imported
|
||||
@ -1269,6 +1260,22 @@ void RimEclipseView::syncronizeWellsWithResults()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseView::syncronizeLocalAnnotationsFromGlobal()
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj && proj->activeOilField())
|
||||
{
|
||||
RimAnnotationCollection* annotColl = proj->activeOilField()->annotationCollection();
|
||||
if (annotColl && annotationCollection())
|
||||
{
|
||||
annotationCollection()->onGlobalCollectionChanged(annotColl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -142,6 +142,8 @@ public:
|
||||
virtual std::vector<RimLegendConfig*> legendConfigs() const override;
|
||||
cvf::Color4f colorFromCellCategory(RivCellSetEnum geometryType) const;
|
||||
|
||||
void syncronizeLocalAnnotationsFromGlobal();
|
||||
|
||||
protected:
|
||||
void initAfterRead() override;
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
Loading…
Reference in New Issue
Block a user