mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1597 Enable New fracture command on well path and show fracture collection only when fractures are present
This commit is contained in:
parent
7c99a2573a
commit
05d210df93
@ -145,5 +145,15 @@ RimWellPathFractureCollection* RicNewWellPathFractureFeature::selectedWellPathFr
|
||||
objHandle->firstAncestorOrThisOfType(objToFind);
|
||||
}
|
||||
|
||||
if (objToFind == nullptr)
|
||||
{
|
||||
std::vector<RimWellPath*> wellPaths;
|
||||
caf::SelectionManager::instance()->objectsByType(&wellPaths);
|
||||
if (!wellPaths.empty())
|
||||
{
|
||||
return wellPaths[0]->fractureCollection();
|
||||
}
|
||||
}
|
||||
|
||||
return objToFind;
|
||||
}
|
||||
|
@ -105,7 +105,8 @@ bool RimWellPathCompletions::hasCompletions() const
|
||||
{
|
||||
return !fishbonesCollection()->fishbonesSubs().empty() ||
|
||||
!fishbonesCollection()->wellPathCollection()->wellPaths().empty() ||
|
||||
!perforationCollection()->perforations().empty();
|
||||
!perforationCollection()->perforations().empty() ||
|
||||
!fractureCollection()->fractures().empty();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -133,4 +134,9 @@ void RimWellPathCompletions::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTree
|
||||
{
|
||||
uiTreeOrdering.add(&m_fishbonesCollection);
|
||||
}
|
||||
|
||||
if (!fractureCollection()->fractures().empty())
|
||||
{
|
||||
uiTreeOrdering.add(&m_fractureCollection);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user