Janitor: select newly created well target candidates generator.

This commit is contained in:
Kristian Bendiksen 2024-12-20 11:06:28 +01:00
parent 1abd0afe6e
commit 944d733875

View File

@ -21,6 +21,8 @@
#include "RimEclipseCaseEnsemble.h"
#include "RimWellTargetCandidatesGenerator.h"
#include "RiuMainWindow.h"
#include "cafSelectionManagerTools.h"
#include <QAction>
@ -35,9 +37,13 @@ void RicNewWellTargetCandidatesGeneratorFeature::onActionTriggered( bool isCheck
auto ensembles = caf::selectedObjectsByTypeStrict<RimEclipseCaseEnsemble*>();
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 );
}
//--------------------------------------------------------------------------------------------------