mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1597 Hide completions for well paths that have none, and enable commands to add new ones on well path directly
This commit is contained in:
@@ -74,6 +74,7 @@ void RicNewPerforationIntervalFeature::onActionTriggered(bool isChecked)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewPerforationIntervalFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setIcon(QIcon(":/PerforationInterval16x16.png"));
|
||||
actionToSetup->setText("New Perforation Interval");
|
||||
}
|
||||
|
||||
@@ -92,5 +93,15 @@ RimPerforationCollection* RicNewPerforationIntervalFeature::selectedPerforationC
|
||||
objHandle->firstAncestorOrThisOfType(objToFind);
|
||||
}
|
||||
|
||||
if (objToFind == nullptr)
|
||||
{
|
||||
std::vector<RimWellPath*> wellPaths;
|
||||
caf::SelectionManager::instance()->objectsByType(&wellPaths);
|
||||
if (!wellPaths.empty())
|
||||
{
|
||||
return wellPaths[0]->perforationIntervalCollection();
|
||||
}
|
||||
}
|
||||
|
||||
return objToFind;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user