mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-30 17:42:13 -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:
1 parent
37e29a0f68
commit
0c90f67dcc
510 files changed
+1651
-3111
No files matched your search
@@ -95,8 +95,7 @@ void RimWellPathAttribute::setDepthsFromWellPath( gsl::not_null<const RimWellPat
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPathAttribute::isEnabled() const
|
||||
{
|
||||
RimWellPathAttributeCollection* collection = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( collection );
|
||||
auto collection = firstAncestorOrThisOfTypeAsserted<RimWellPathAttributeCollection>();
|
||||
return collection->isChecked();
|
||||
}
|
||||
|
||||
@@ -260,9 +259,8 @@ void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedF
|
||||
{
|
||||
if ( m_type() == RiaDefines::WellPathComponentType::CASING )
|
||||
{
|
||||
RimWellPath* wellPath = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
m_startMD = wellPath->startMD();
|
||||
auto wellPath = firstAncestorOrThisOfTypeAsserted<RimWellPath>();
|
||||
m_startMD = wellPath->startMD();
|
||||
|
||||
if ( !supportedDiameters( m_type() ).count( m_diameterInInches() ) )
|
||||
{
|
||||
@@ -290,13 +288,11 @@ void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedF
|
||||
}
|
||||
|
||||
{
|
||||
RimWellPathAttributeCollection* collection = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( collection );
|
||||
auto collection = firstAncestorOrThisOfTypeAsserted<RimWellPathAttributeCollection>();
|
||||
collection->updateAllReferringTracks();
|
||||
}
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted( proj );
|
||||
RimProject* proj = RimProject::current();
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user