#3447, #3207, #3448 Polished the target table. Improved insert target commands, Add icons to editable wellpaths and target list.

This commit is contained in:
Jacob Støren
2018-10-02 15:55:28 +02:00
parent 1dfad4f01d
commit d9e8537974
9 changed files with 116 additions and 15 deletions

View File

@@ -58,7 +58,7 @@ CAF_PDM_SOURCE_INIT(RimWellPathGeometryDef, "WellPathGeometryDef");
RimWellPathGeometryDef::RimWellPathGeometryDef()
: m_pickTargetsEventHandler(new RicCreateWellTargetsPickEventHandler(this))
{
CAF_PDM_InitObject("Well Targets", ":/Well.png", "", "");
CAF_PDM_InitObject("Well Targets", ":/WellTargets.png", "", "");
CAF_PDM_InitField(&m_referencePointUtmXyd, "ReferencePosUtmXyd", cvf::Vec3d(0,0,0), "UTM Reference Point", "", "", "");
@@ -164,6 +164,31 @@ void RimWellPathGeometryDef::updateWellPathVisualization()
modWellPath->updateWellPathVisualization();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::pair<RimWellPathTarget*, RimWellPathTarget*>
RimWellPathGeometryDef::findActiveTargetsAroundInsertionPoint(const RimWellPathTarget* targetToInsertBefore)
{
RimWellPathTarget* before = nullptr;
RimWellPathTarget* after = nullptr;
bool foundTarget = false;
for (const auto& wt : m_wellTargets)
{
if ( wt == targetToInsertBefore )
{
foundTarget = true;
}
if ( wt->isEnabled() && !after && foundTarget ) after = wt;
if ( wt->isEnabled() && !foundTarget ) before = wt;
}
return { before, after};
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------