From dbd09e97e3b02c1bbcdea85c4f31ff657d19c5e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Wed, 30 Oct 2019 10:02:36 +0100 Subject: [PATCH] #4857 Fix intersection polyline picking in comparison view --- .../RicNewPolylineIntersectionFeature.cpp | 2 +- .../WellPathCommands/RicIntersectionPickEventHandler.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.cpp b/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.cpp index e08162570f..043d4b3f7d 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.cpp +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewPolylineIntersectionFeature.cpp @@ -108,7 +108,7 @@ void RicNewPolylineIntersectionFeatureCmd::redo() intersection->type = RimIntersection::CS_POLYLINE; intersection->inputPolyLineFromViewerEnabled = true; - m_intersectionCollection->appendIntersectionAndUpdate( intersection ); + m_intersectionCollection->appendIntersectionAndUpdate( intersection, false ); Riu3dSelectionManager::instance()->deleteAllItems(); diff --git a/ApplicationCode/Commands/WellPathCommands/RicIntersectionPickEventHandler.cpp b/ApplicationCode/Commands/WellPathCommands/RicIntersectionPickEventHandler.cpp index d05e42e5b0..8cb36013b0 100644 --- a/ApplicationCode/Commands/WellPathCommands/RicIntersectionPickEventHandler.cpp +++ b/ApplicationCode/Commands/WellPathCommands/RicIntersectionPickEventHandler.cpp @@ -52,13 +52,14 @@ bool RicIntersectionPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& e RimGridView* gridView = nullptr; intersection->firstAncestorOrThisOfTypeAsserted( gridView ); - if ( RiaApplication::instance()->activeGridView() != gridView ) + if ( RiaApplication::instance()->activeMainOrComparisonGridView() != gridView ) { return false; } - cvf::ref transForm = gridView->displayCoordTransform(); - cvf::Vec3d domainCoord = transForm->transformToDomainCoord( + cvf::ref transForm = gridView->displayCoordTransform(); + + cvf::Vec3d domainCoord = transForm->transformToDomainCoord( eventObject.m_pickItemInfos.front().globalPickedPoint() ); if ( intersection->inputPolyLineFromViewerEnabled() )