mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 08:25:03 -05:00
#2020 Move LAS files. Implement isCommandEnabled
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user