mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#641) Create user defined polyline by clicking on reservoir cells
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "RicGeoMechPropertyFilterNewExec.h"
|
||||
#include "RicRangeFilterNewExec.h"
|
||||
|
||||
#include "CrossSectionCommands/RicNewPolylineCrossSectionFeature.h"
|
||||
#include "CrossSectionCommands/RicNewSimWellCrossSectionFeature.h"
|
||||
#include "CrossSectionCommands/RicNewWellPathCrossSectionFeature.h"
|
||||
#include "WellLogCommands/RicNewWellLogCurveExtractionFeature.h"
|
||||
@@ -277,6 +278,8 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
|
||||
commandIds << "RicSetMasterViewFeature";
|
||||
}
|
||||
|
||||
commandIds << "RicNewPolylineCrossSectionFeature";
|
||||
|
||||
RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu);
|
||||
|
||||
if (menu.actions().size() > 0)
|
||||
@@ -439,6 +442,17 @@ void RiuViewerCommands::handlePickAction(int winPosX, int winPosY, Qt::KeyboardM
|
||||
if (m_viewer->rayPick(winPosX, winPosY, &hitItems))
|
||||
{
|
||||
extractIntersectionData(hitItems, &localIntersectionPoint, &firstHitPart, &firstPartTriangleIndex, &firstNncHitPart, &nncPartTriangleIndex);
|
||||
|
||||
if (!m_activeUiCommandFeature.isNull())
|
||||
{
|
||||
cvf::ref<RicPolylineUiEvent> uiEventObj = new RicPolylineUiEvent(localIntersectionPoint);
|
||||
|
||||
if (m_activeUiCommandFeature->handleUiEvent(uiEventObj.p()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
updateSelectionFromPickedPart(firstHitPart);
|
||||
}
|
||||
|
||||
@@ -564,6 +578,22 @@ void RiuViewerCommands::findCellAndGridIndex(const RivCrossSectionSourceInfo* cr
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewerCommands::setActiveUiCommandFeature(RicCommandFeature* uiCommandFeature)
|
||||
{
|
||||
m_activeUiCommandFeature = uiCommandFeature;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicCommandFeature* RiuViewerCommands::activeUiCommandFeature() const
|
||||
{
|
||||
return m_activeUiCommandFeature;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Perform picking and return the index of the face that was hit, if a drawable geo was hit
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user