mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06: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:
@@ -96,8 +96,7 @@ caf::PdmFieldHandle* RimIntersectionCollection::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= "" */ )
|
||||
{
|
||||
RimGridView* gridView = nullptr;
|
||||
this->firstAncestorOfType( gridView );
|
||||
auto gridView = firstAncestorOfType<RimGridView>();
|
||||
if ( gridView )
|
||||
{
|
||||
auto uiTree = gridView->separateIntersectionResultsCollection()->uiTreeOrdering();
|
||||
@@ -251,7 +250,7 @@ void RimIntersectionCollection::rebuildGeometry()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimExtrudedCurveIntersection*> RimIntersectionCollection::intersections() const
|
||||
{
|
||||
return m_intersections.children();
|
||||
return m_intersections.childrenByType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -259,7 +258,7 @@ std::vector<RimExtrudedCurveIntersection*> RimIntersectionCollection::intersecti
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimBoxIntersection*> RimIntersectionCollection::intersectionBoxes() const
|
||||
{
|
||||
return m_intersectionBoxes.children();
|
||||
return m_intersectionBoxes.childrenByType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -306,8 +305,7 @@ void RimIntersectionCollection::appendIntersectionNoUpdate( RimExtrudedCurveInte
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::syncronize2dIntersectionViews()
|
||||
{
|
||||
RimCase* ownerCase = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( ownerCase );
|
||||
auto ownerCase = firstAncestorOrThisOfTypeAsserted<RimCase>();
|
||||
ownerCase->intersectionViewCollection()->syncFromExistingIntersections( true );
|
||||
}
|
||||
|
||||
@@ -508,9 +506,7 @@ void RimIntersectionCollection::defineEditorAttribute( const caf::PdmFieldHandle
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseView* RimIntersectionCollection::eclipseView() const
|
||||
{
|
||||
RimEclipseView* eclipseView = nullptr;
|
||||
firstAncestorOrThisOfType( eclipseView );
|
||||
return eclipseView;
|
||||
return firstAncestorOrThisOfType<RimEclipseView>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -518,8 +514,7 @@ RimEclipseView* RimIntersectionCollection::eclipseView() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::rebuild3dView() const
|
||||
{
|
||||
Rim3dView* rimView = nullptr;
|
||||
firstAncestorOrThisOfType( rimView );
|
||||
auto rimView = firstAncestorOrThisOfType<Rim3dView>();
|
||||
if ( rimView )
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
Reference in New Issue
Block a user