Group only with selected paths

This commit is contained in:
Gaute Lindkvist
2020-10-20 13:46:05 +02:00
parent 19a8aece0e
commit f569d6872b
3 changed files with 53 additions and 40 deletions

View File

@@ -99,6 +99,10 @@ bool RimWellPathGroup::hasChildWellPath( RimWellPath* wellPath )
void RimWellPathGroup::removeChildWellPath( RimWellPath* wellPath )
{
m_childWellPaths.removeChildObject( wellPath );
if ( auto geometry = wellPath->wellPathGeometry(); geometry )
{
geometry->setUniqueStartIndex( 0u );
}
createWellPathGeometry();
updateWellPathName();
}
@@ -108,7 +112,11 @@ void RimWellPathGroup::removeChildWellPath( RimWellPath* wellPath )
//--------------------------------------------------------------------------------------------------
void RimWellPathGroup::removeAllChildWellPaths()
{
m_childWellPaths.clear();
auto childWellPaths = m_childWellPaths.childObjects();
for ( auto wellPath : childWellPaths )
{
removeChildWellPath( wellPath );
}
setWellPathGeometry( cvf::ref<RigWellPath>( new RigWellPath ).p() );
updateWellPathName();
}