mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 14:40:26 -05:00
Refactors selection handling for improved code clarity
Modernize the interface to selection system. Create and return data instead of populating incoming parameters.
This commit is contained in:
1 parent
380f559f0d
commit
ae8446073b
136 files changed
+357
-870
No files matched your search
@@ -33,10 +33,8 @@ CAF_CMD_SOURCE_INIT( RicDeleteWellPathFeature, "RicDeleteWellPathFeature" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicDeleteWellPathFeature::isCommandEnabled() const
|
||||
{
|
||||
std::vector<RimWellPath*> objects;
|
||||
caf::SelectionManager::instance()->objectsByType( &objects );
|
||||
|
||||
return !objects.empty();
|
||||
const auto wellPaths = caf::SelectionManager::instance()->objectsByType<RimWellPath>();
|
||||
return !wellPaths.empty();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -44,9 +42,7 @@ bool RicDeleteWellPathFeature::isCommandEnabled() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicDeleteWellPathFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
std::vector<RimWellPath*> wellPaths;
|
||||
caf::SelectionManager::instance()->objectsByType( &wellPaths );
|
||||
|
||||
const auto wellPaths = caf::SelectionManager::instance()->objectsByType<RimWellPath>();
|
||||
if ( !wellPaths.empty() )
|
||||
{
|
||||
auto wpc = RimTools::wellPathCollection();
|
||||
|
||||
Reference in new issue
Block a user