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:
@@ -283,7 +283,7 @@ void RimWellPathCollection::addWellPath( gsl::not_null<RimWellPath*> wellPath )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellPath*> RimWellPathCollection::allWellPaths() const
|
||||
{
|
||||
return m_wellPaths.children();
|
||||
return m_wellPaths.childrenByType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -485,8 +485,7 @@ caf::PdmFieldHandle* RimWellPathCollection::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::scheduleRedrawAffectedViews()
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType( proj );
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( proj ) proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
@@ -760,8 +759,7 @@ void RimWellPathCollection::sortWellsByName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> RimWellPathCollection::findUnitSystemForWellPath( const RimWellPath* wellPath )
|
||||
{
|
||||
RimProject* project;
|
||||
firstAncestorOrThisOfTypeAsserted( project );
|
||||
RimProject* project = RimProject::current();
|
||||
if ( project->activeOilField()->analysisModels->cases.empty() )
|
||||
{
|
||||
return RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
@@ -790,7 +788,7 @@ void RimWellPathCollection::rebuildWellPathNodes()
|
||||
{
|
||||
m_wellPathNodes.deleteChildren();
|
||||
|
||||
std::map<QString, std::vector<RimWellPath*>> rootWells = wellPathsForWellNameStem( m_wellPaths.children() );
|
||||
std::map<QString, std::vector<RimWellPath*>> rootWells = wellPathsForWellNameStem( m_wellPaths.childrenByType() );
|
||||
for ( auto [groupName, wellPathGroup] : rootWells )
|
||||
{
|
||||
if ( groupName == unGroupedText() )
|
||||
|
||||
Reference in New Issue
Block a user