mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 14:40:26 -05:00
#13376 Well Target Table: Fix menu visibility.
Introduced in ae8446073b.
Fixes #13376.
This commit is contained in:
1 parent
405a32e2da
commit
43755feb42
1 file changed
+6
-4
@@ -17,8 +17,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#include "RicDeleteWellPathTargetFeature.h"
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicDeleteWellPathTargetFeature, "RicDeleteWellPathTargetFeature" );
|
||||
|
||||
#include "RimModeledWellPath.h"
|
||||
#include "RimWellPathGeometryDef.h"
|
||||
#include "RimWellPathTarget.h"
|
||||
@@ -27,12 +25,15 @@ CAF_CMD_SOURCE_INIT( RicDeleteWellPathTargetFeature, "RicDeleteWellPathTargetFea
|
||||
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicDeleteWellPathTargetFeature, "RicDeleteWellPathTargetFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicDeleteWellPathTargetFeature::isCommandEnabled() const
|
||||
{
|
||||
const auto targets = caf::SelectionManager::instance()->objectsByType<RimWellPathTarget>();
|
||||
const auto targets =
|
||||
caf::SelectionManager::instance()->objectsByType<RimWellPathTarget>( caf::SelectionManager::SelectionLevel::FIRST_LEVEL );
|
||||
return !targets.empty();
|
||||
}
|
||||
|
||||
@@ -41,7 +42,8 @@ bool RicDeleteWellPathTargetFeature::isCommandEnabled() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicDeleteWellPathTargetFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
const auto targets = caf::SelectionManager::instance()->objectsByType<RimWellPathTarget>();
|
||||
const auto targets =
|
||||
caf::SelectionManager::instance()->objectsByType<RimWellPathTarget>( caf::SelectionManager::SelectionLevel::FIRST_LEVEL );
|
||||
if ( !targets.empty() )
|
||||
{
|
||||
RimWellPathGeometryDef* wellGeomDef = targets[0]->firstAncestorOrThisOfTypeAsserted<RimWellPathGeometryDef>();
|
||||
|
||||
Reference in new issue
Block a user