mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5285 Surface Import command. SurfaceInView tree-items. Delete.
Ready to start on visualization code
This commit is contained in:
@@ -29,8 +29,11 @@
|
||||
#include "RimGridCollection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimIntersectionResultsDefinitionCollection.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimPropertyFilterCollection.h"
|
||||
#include "RimSurfaceCollection.h"
|
||||
#include "RimSurfaceInViewCollection.h"
|
||||
#include "RimTextAnnotation.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimViewLinker.h"
|
||||
@@ -97,6 +100,9 @@ RimGridView::RimGridView()
|
||||
CAF_PDM_InitFieldNoDefault( &m_wellMeasurementCollection, "WellMeasurements", "Well Measurements", "", "", "" );
|
||||
m_wellMeasurementCollection = new RimWellMeasurementInViewCollection;
|
||||
m_wellMeasurementCollection.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_surfaceCollection, "SurfaceInViewCollection", "Surface Collection Field", "", "", "" );
|
||||
m_surfaceCollection.uiCapability()->setUiTreeHidden( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -174,6 +180,14 @@ RimIntersectionCollection* RimGridView::intersectionCollection() const
|
||||
return m_intersectionCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSurfaceInViewCollection* RimGridView::surfaceInViewCollection() const
|
||||
{
|
||||
return m_surfaceCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -565,3 +579,28 @@ void RimGridView::updateWellMeasurements()
|
||||
{
|
||||
m_wellMeasurementCollection->syncWithChangesInWellMeasurementCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridView::updateSurfacesInViewTreeItems()
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
RimSurfaceCollection* surfColl = proj->activeOilField()->surfaceCollection();
|
||||
|
||||
if ( surfColl && surfColl->surfaces().size() )
|
||||
{
|
||||
if ( !m_surfaceCollection() )
|
||||
{
|
||||
m_surfaceCollection = new RimSurfaceInViewCollection();
|
||||
}
|
||||
|
||||
m_surfaceCollection->updateFromSurfaceCollection();
|
||||
}
|
||||
else
|
||||
{
|
||||
delete m_surfaceCollection;
|
||||
}
|
||||
|
||||
this->updateConnectedEditors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user