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:
@@ -435,8 +435,7 @@ void RimStreamlineInViewCollection::updateStreamlines()
|
||||
bool bNeedRedraw = ( m_streamlines.size() > 0 );
|
||||
|
||||
// get the view
|
||||
RimEclipseView* eclView = nullptr;
|
||||
this->firstAncestorOrThisOfType( eclView );
|
||||
auto eclView = firstAncestorOrThisOfType<RimEclipseView>();
|
||||
if ( !eclView ) return;
|
||||
|
||||
if ( m_shouldGenerateTracers && isActive() )
|
||||
@@ -545,8 +544,7 @@ void RimStreamlineInViewCollection::outputSummary() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStreamlineInViewCollection::initAfterRead()
|
||||
{
|
||||
RimEclipseView* eclView = nullptr;
|
||||
this->firstAncestorOrThisOfType( eclView );
|
||||
auto eclView = firstAncestorOrThisOfType<RimEclipseView>();
|
||||
|
||||
if ( eclView && m_isActive() ) eclView->requestAnimationTimer();
|
||||
}
|
||||
@@ -657,9 +655,7 @@ void RimStreamlineInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
m_shouldGenerateTracers = true;
|
||||
}
|
||||
|
||||
RimEclipseView* eclView = nullptr;
|
||||
this->firstAncestorOrThisOfType( eclView );
|
||||
|
||||
auto eclView = firstAncestorOrThisOfType<RimEclipseView>();
|
||||
if ( changedField == &m_isActive )
|
||||
{
|
||||
if ( eclView )
|
||||
|
||||
Reference in New Issue
Block a user