#2020 Move LAS files. Implement isCommandEnabled

This commit is contained in:
Bjørn Erik Jensen 2017-11-20 10:34:57 +01:00
parent 19157ce4f7
commit e843c58798

View File

@ -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;
}
//--------------------------------------------------------------------------------------------------