mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 01:12:11 -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
@@ -186,8 +186,7 @@ void RimSimWellFracture::fieldChangedByUi( const caf::PdmFieldHandle* changedFie
|
||||
updateAzimuthBasedOnWellAzimuthAngle();
|
||||
}
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType( proj );
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( proj ) proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
}
|
||||
@@ -215,8 +214,7 @@ void RimSimWellFracture::updateFracturePositionFromLocation()
|
||||
|
||||
this->setAnchorPosition( interpolated );
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType( proj );
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( proj ) proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
}
|
||||
@@ -314,9 +312,7 @@ QList<caf::PdmOptionItemInfo> RimSimWellFracture::calculateValueOptions( const c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigMainGrid* RimSimWellFracture::ownerCaseMainGrid() const
|
||||
{
|
||||
RimEclipseView* ownerEclView;
|
||||
this->firstAncestorOrThisOfType( ownerEclView );
|
||||
|
||||
auto ownerEclView = firstAncestorOrThisOfType<RimEclipseView>();
|
||||
if ( ownerEclView )
|
||||
return ownerEclView->mainGrid();
|
||||
else
|
||||
@@ -341,10 +337,7 @@ void RimSimWellFracture::computeSimWellBranchCenterLines()
|
||||
{
|
||||
m_branchCenterLines.clear();
|
||||
|
||||
RimSimWellInView* rimWell = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimWell );
|
||||
CVF_ASSERT( rimWell );
|
||||
|
||||
auto rimWell = firstAncestorOrThisOfTypeAsserted<RimSimWellInView>();
|
||||
const auto simWellBranches = RigSimulationWellCenterLineCalculator::calculateWellPipeStaticCenterline( rimWell );
|
||||
for ( const auto& [coords, wellCells] : simWellBranches )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user