diff --git a/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.cpp b/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.cpp index 5c98ba09f5..dbb6d2fd94 100644 --- a/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.cpp +++ b/ApplicationCode/Commands/CrossSectionCommands/RicNewWellPathIntersectionFeature.cpp @@ -53,7 +53,7 @@ bool RicNewWellPathIntersectionFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- void RicNewWellPathIntersectionFeature::onActionTriggered( bool isChecked ) { - RimGridView* activeView = RiaApplication::instance()->activeGridView(); + RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView(); if ( !activeView ) return; std::vector collection; @@ -113,7 +113,7 @@ void RicNewWellPathIntersectionFeatureCmd::redo() intersection->type = RimIntersection::CS_WELL_PATH; intersection->wellPath = m_wellPath; - m_intersectionCollection->appendIntersectionAndUpdate( intersection ); + m_intersectionCollection->appendIntersectionAndUpdate( intersection, false ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp index 5a418f4df3..4137ae6677 100644 --- a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.cpp @@ -198,14 +198,14 @@ void RimIntersectionCollection::recomputeSimWellBranchData() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimIntersectionCollection::appendIntersectionAndUpdate( RimIntersection* intersection ) +void RimIntersectionCollection::appendIntersectionAndUpdate( RimIntersection* intersection, bool allowActiveViewChange ) { m_intersections.push_back( intersection ); syncronize2dIntersectionViews(); updateConnectedEditors(); - Riu3DMainWindowTools::selectAsCurrentItem( intersection ); + Riu3DMainWindowTools::selectAsCurrentItem( intersection, allowActiveViewChange ); Rim3dView* rimView = nullptr; firstAncestorOrThisOfType( rimView ); diff --git a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h index e2bb63502d..19a0b6470b 100644 --- a/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h +++ b/ApplicationCode/ProjectDataModel/RimIntersectionCollection.h @@ -52,7 +52,7 @@ public: caf::PdmField isActive; - void appendIntersectionAndUpdate( RimIntersection* intersection ); + void appendIntersectionAndUpdate( RimIntersection* intersection, bool allowActiveViewChange = true ); void appendIntersectionNoUpdate( RimIntersection* intersection ); void appendIntersectionBoxAndUpdate( RimIntersectionBox* intersectionBox );