#2634 Fix wrong MD when context menu creating completions in 2D intersectino View

This commit is contained in:
Jacob Støren
2018-03-21 13:57:21 +01:00
parent 25ff51c82b
commit dd29a3c727
10 changed files with 36 additions and 57 deletions

View File

@@ -343,9 +343,12 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
{
if (firstPartTriangleIndex != cvf::UNDEFINED_UINT)
{
double measuredDepth = wellPathSourceInfo->measuredDepth(firstPartTriangleIndex, m_currentPickPositionInDomainCoords);
cvf::Vec3d trueVerticalDepth = wellPathSourceInfo->trueVerticalDepth(firstPartTriangleIndex, globalIntersectionPoint);
RiuSelectionItem* selItem = new RiuWellPathSelectionItem(wellPathSourceInfo, trueVerticalDepth, measuredDepth);
cvf::Vec3d pickedPositionInUTM = m_currentPickPositionInDomainCoords;
if (int2dView) pickedPositionInUTM = int2dView->transformToUtm(pickedPositionInUTM);
double measuredDepth = wellPathSourceInfo->measuredDepth(firstPartTriangleIndex, pickedPositionInUTM);
cvf::Vec3d closestPointOnCenterLine = wellPathSourceInfo->closestPointOnCenterLine(firstPartTriangleIndex, pickedPositionInUTM);
RiuSelectionItem* selItem = new RiuWellPathSelectionItem(wellPathSourceInfo, closestPointOnCenterLine, measuredDepth);
RiuSelectionManager::instance()->setSelectedItem(selItem, RiuSelectionManager::RUI_TEMPORARY);
}