2019-01-16 03:51:43 -06:00
|
|
|
#include "RimEclipseContourMapViewCollection.h"
|
2018-10-23 09:32:40 -05:00
|
|
|
|
2022-10-31 04:41:50 -05:00
|
|
|
#include "RimEclipseCase.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "RimEclipseContourMapView.h"
|
2018-10-23 09:32:40 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_SOURCE_INIT( RimEclipseContourMapViewCollection, "Eclipse2dViewCollection" );
|
2018-10-23 09:32:40 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-10-23 09:32:40 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-01-16 03:51:43 -06:00
|
|
|
RimEclipseContourMapViewCollection::RimEclipseContourMapViewCollection()
|
2018-10-23 09:32:40 -05:00
|
|
|
{
|
2022-01-07 01:31:52 -06:00
|
|
|
CAF_PDM_InitObject( "Contour Maps", ":/2DMaps16x16.png" );
|
2018-10-23 09:32:40 -05:00
|
|
|
|
2022-01-07 01:31:52 -06:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_contourMapViews, "EclipseViews", "Contour Maps", ":/CrossSection16x16.png" );
|
2019-09-06 03:40:57 -05:00
|
|
|
m_contourMapViews.uiCapability()->setUiTreeHidden( true );
|
2018-10-23 09:32:40 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-10-23 09:32:40 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2020-02-12 04:13:38 -06:00
|
|
|
RimEclipseContourMapViewCollection::~RimEclipseContourMapViewCollection()
|
|
|
|
{
|
|
|
|
}
|
2018-10-23 09:32:40 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-10-23 09:32:40 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-01-16 03:51:43 -06:00
|
|
|
std::vector<RimEclipseContourMapView*> RimEclipseContourMapViewCollection::views()
|
2018-10-23 09:32:40 -05:00
|
|
|
{
|
2022-05-31 06:08:07 -05:00
|
|
|
return m_contourMapViews.children();
|
2018-10-23 09:32:40 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RimEclipseContourMapViewCollection::push_back( RimEclipseContourMapView* contourMap )
|
2018-10-23 09:32:40 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
m_contourMapViews.push_back( contourMap );
|
2018-10-23 09:32:40 -05:00
|
|
|
}
|
2022-10-31 04:41:50 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimEclipseContourMapViewCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
|
|
|
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
|
|
|
{
|
|
|
|
RimEclipseCase* eclipseCase = nullptr;
|
|
|
|
this->firstAncestorOrThisOfType( eclipseCase );
|
|
|
|
if ( eclipseCase ) eclipseCase->updateConnectedEditors();
|
|
|
|
}
|