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:
@@ -63,8 +63,7 @@ void RicAppendIntersectionBoxFeature::onActionTriggered( bool isChecked )
|
||||
coll->updateConnectedEditors();
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( intersectionBox );
|
||||
|
||||
RimGridView* rimView = nullptr;
|
||||
coll->firstAncestorOrThisOfTypeAsserted( rimView );
|
||||
RimGridView* rimView = coll->firstAncestorOrThisOfTypeAsserted<RimGridView>();
|
||||
rimView->showGridCells( false );
|
||||
}
|
||||
}
|
||||
@@ -83,14 +82,12 @@ void RicAppendIntersectionBoxFeature::setupActionLook( QAction* actionToSetup )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionCollection* RicAppendIntersectionBoxFeature::intersectionCollection()
|
||||
{
|
||||
RimIntersectionCollection* intersectionBoxColl = nullptr;
|
||||
|
||||
std::vector<caf::PdmObjectHandle*> selectedObjects;
|
||||
caf::SelectionManager::instance()->objectsByType( &selectedObjects );
|
||||
if ( selectedObjects.size() == 1 )
|
||||
{
|
||||
selectedObjects[0]->firstAncestorOrThisOfType( intersectionBoxColl );
|
||||
return selectedObjects[0]->firstAncestorOrThisOfType<RimIntersectionCollection>();
|
||||
}
|
||||
|
||||
return intersectionBoxColl;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user