mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3447, #3207, #3448 Polished the target table. Improved insert target commands, Add icons to editable wellpaths and target list.
This commit is contained in:
@@ -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};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user