#2020 Move LAS files. Implement isCommandEnabled

This commit is contained in:
Bjørn Erik Jensen committed 2017-11-20 12:46:13 +01:00
1 parent 19157ce4f7
commit e843c58798
1 file changed
+7 -1
@@ -38,7 +38,13 @@ CAF_CMD_SOURCE_INIT(RicMoveWellLogFilesFeature, "RicMoveWellLogFilesFeature");
//--------------------------------------------------------------------------------------------------
bool RicMoveWellLogFilesFeature::isCommandEnabled()
{
return true;
RimWellLogFile* selectedWellLogFile = caf::firstAncestorOfTypeFromSelectedObject<RimWellLogFile*>();
if (!selectedWellLogFile) return false;
// If only one well path exists, the move command is not applicable
RimProject* proj = RiaApplication::instance()->project();
return proj->allWellPaths().size() > 1;
}
//--------------------------------------------------------------------------------------------------