mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-13 17:02:13 -05:00
Change API for PdmObjectHandle and PdmFieldHandle
* Refactor interface to PdmObjectHandle and PdmFieldHandle Return objects instead of passing in structures as parameters * Add nodiscard to several functions * Remove redundant this-> * Rename to ptrReferencedObjectsByType
This commit is contained in:
1 parent
37e29a0f68
commit
0c90f67dcc
510 files changed
+1651
-3111
No files matched your search
@@ -74,7 +74,7 @@ RimSeismicData* RimSeismicDataCollection::importSeismicFromFile( const QString f
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimSeismicData*> RimSeismicDataCollection::seismicData() const
|
||||
{
|
||||
return m_seismicData.children();
|
||||
return m_seismicData.childrenByType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -384,7 +384,7 @@ std::vector<RimPolylineTarget*> RimSeismicSection::activeTargets() const
|
||||
{
|
||||
if ( m_type() != RiaDefines::SeismicSectionType::SS_POLYLINE ) return {};
|
||||
|
||||
return m_targets.children();
|
||||
return m_targets.childrenByType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -456,8 +456,7 @@ void RimSeismicSection::updateEditorsAndVisualization()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSeismicSection::scheduleViewUpdate()
|
||||
{
|
||||
Rim3dView* view = nullptr;
|
||||
firstAncestorOrThisOfType( view );
|
||||
auto view = firstAncestorOrThisOfType<Rim3dView>();
|
||||
if ( view ) view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
@@ -543,8 +542,7 @@ QList<caf::PdmOptionItemInfo> RimSeismicSection::calculateValueOptions( const ca
|
||||
|
||||
if ( fieldNeedingOptions == &m_seismicData )
|
||||
{
|
||||
Rim3dView* view = nullptr;
|
||||
firstAncestorOrThisOfType( view );
|
||||
auto view = firstAncestorOrThisOfType<Rim3dView>();
|
||||
|
||||
if ( view != nullptr ) RimTools::seismicDataOptionItems( &options, view->domainBoundingBox() );
|
||||
}
|
||||
|
||||
@@ -64,8 +64,7 @@ RimSeismicSectionCollection::~RimSeismicSectionCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSeismicSection* RimSeismicSectionCollection::addNewSection( RiaDefines::SeismicSectionType sectionType )
|
||||
{
|
||||
Rim3dView* view = nullptr;
|
||||
firstAncestorOrThisOfType( view );
|
||||
auto view = firstAncestorOrThisOfType<Rim3dView>();
|
||||
if ( view == nullptr ) return nullptr;
|
||||
|
||||
RimSeismicData* defaultSeis = nullptr;
|
||||
@@ -146,7 +145,7 @@ void RimSeismicSectionCollection::defineUiOrdering( QString uiConfigName, caf::P
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimSeismicSection*> RimSeismicSectionCollection::seismicSections() const
|
||||
{
|
||||
return m_seismicSections.children();
|
||||
return m_seismicSections.childrenByType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -254,8 +253,7 @@ void RimSeismicSectionCollection::onChildDeleted( caf::PdmChildArrayFieldHandle*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSeismicSectionCollection::updateView()
|
||||
{
|
||||
Rim3dView* view = nullptr;
|
||||
firstAncestorOrThisOfType( view );
|
||||
auto view = firstAncestorOrThisOfType<Rim3dView>();
|
||||
if ( view ) view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user