mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1427 Apply specific changes from pre-proto regarding selection in 3D
To be used for transporting branch index from 3D context menu operation to feature.
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "RivSimWellPipeSourceInfo.h"
|
||||
#include "RivWellPathSourceInfo.h"
|
||||
|
||||
#include "RiuSelectionChangedHandler.h"
|
||||
|
||||
@@ -63,6 +67,24 @@ void RiuSelectionManager::selectedItems(std::vector<RiuSelectionItem*>& items, i
|
||||
items = s;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuSelectionItem* RiuSelectionManager::selectedItem(int role /*= RUI_APPLICATION_GLOBAL*/) const
|
||||
{
|
||||
const std::vector<RiuSelectionItem*>& s = m_selection[role];
|
||||
|
||||
if (s.size() == 1)
|
||||
{
|
||||
if (s[0])
|
||||
{
|
||||
return s[0];
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -181,3 +203,27 @@ RiuGeoMechSelectionItem::RiuGeoMechSelectionItem(RimGeoMechView* view,
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWellPathSelectionItem::RiuWellPathSelectionItem(const RivWellPathSourceInfo* wellPathSourceInfo,
|
||||
const cvf::Vec3d& pipeCenterLineIntersectionInDomainCoords,
|
||||
double measuredDepth)
|
||||
: m_pipeCenterlineIntersectionInDomainCoords(pipeCenterLineIntersectionInDomainCoords),
|
||||
m_measuredDepth(measuredDepth)
|
||||
{
|
||||
m_wellpath = wellPathSourceInfo->wellPath();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuSimWellSelectionItem::RiuSimWellSelectionItem(RimEclipseWell* simwell,
|
||||
cvf::Vec3d m_domainCoord,
|
||||
size_t m_branchIndex)
|
||||
: m_simWell(simwell),
|
||||
m_domainCoord(m_domainCoord),
|
||||
m_branchIndex(m_branchIndex)
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user