mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2609 Well Path Creation: Create duplicate of well target
This commit is contained in:
@@ -123,6 +123,29 @@ void RimWellPathGeometryDef::deleteTarget(RimWellPathTarget* targetTodelete)
|
||||
delete targetTodelete;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathGeometryDef::appendTarget()
|
||||
{
|
||||
RimWellPathTarget* wellPathTarget = nullptr;
|
||||
|
||||
auto targets = m_wellTargets.childObjects();
|
||||
if (targets.empty())
|
||||
{
|
||||
wellPathTarget = new RimWellPathTarget;
|
||||
}
|
||||
else
|
||||
{
|
||||
wellPathTarget = dynamic_cast<RimWellPathTarget*>(targets.back()->xmlCapability()->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance()));
|
||||
}
|
||||
|
||||
if (wellPathTarget)
|
||||
{
|
||||
m_wellTargets.push_back(wellPathTarget);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user