mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2020 Move LAS files. Implement isCommandEnabled
This commit is contained in:
@@ -38,7 +38,13 @@ CAF_CMD_SOURCE_INIT(RicMoveWellLogFilesFeature, "RicMoveWellLogFilesFeature");
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RicMoveWellLogFilesFeature::isCommandEnabled()
|
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