From ac985ade00b0d7c4ff3ea9881d39be037097d4a8 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Fri, 20 Dec 2024 11:06:28 +0100 Subject: [PATCH] Janitor: select newly created well target candidates generator. --- .../RicNewWellTargetCandidatesGeneratorFeature.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ApplicationLibCode/Commands/RicNewWellTargetCandidatesGeneratorFeature.cpp b/ApplicationLibCode/Commands/RicNewWellTargetCandidatesGeneratorFeature.cpp index 77d0875b5f..f1c678693a 100644 --- a/ApplicationLibCode/Commands/RicNewWellTargetCandidatesGeneratorFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewWellTargetCandidatesGeneratorFeature.cpp @@ -21,6 +21,8 @@ #include "RimEclipseCaseEnsemble.h" #include "RimWellTargetCandidatesGenerator.h" +#include "RiuMainWindow.h" + #include "cafSelectionManagerTools.h" #include @@ -35,9 +37,13 @@ void RicNewWellTargetCandidatesGeneratorFeature::onActionTriggered( bool isCheck auto ensembles = caf::selectedObjectsByTypeStrict(); if ( ensembles.empty() ) return; - auto ensemble = ensembles.front(); - ensemble->addWellTargetsGenerator( new RimWellTargetCandidatesGenerator() ); + auto ensemble = ensembles.front(); + auto generator = new RimWellTargetCandidatesGenerator(); + ensemble->addWellTargetsGenerator( generator ); + ensemble->updateConnectedEditors(); + + RiuMainWindow::instance()->selectAsCurrentItem( generator ); } //--------------------------------------------------------------------------------------------------