From c0d8fe37e17d4da2a08268edec162f0d6cd1f414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Jensen?= Date: Wed, 10 Oct 2018 10:08:00 +0200 Subject: [PATCH] Export Well Paths. Show commands only for well path nodes --- .../ExportCommands/RicExportVisibleWellPathsFeature.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.cpp b/ApplicationCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.cpp index 19d9e059a7..8262718340 100644 --- a/ApplicationCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.cpp +++ b/ApplicationCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.cpp @@ -81,9 +81,10 @@ void RicExportVisibleWellPathsFeature::exportWellPath(const RimWellPath* wellPat //-------------------------------------------------------------------------------------------------- bool RicExportVisibleWellPathsFeature::isCommandEnabled() { - std::vector wellPaths = RicExportCompletionsForVisibleWellPathsFeature::visibleWellPaths(); + std::vector selectedWellPaths = caf::selectedObjectsByTypeStrict(); + std::vector visibleWellPaths = RicExportCompletionsForVisibleWellPathsFeature::visibleWellPaths(); - return !wellPaths.empty(); + return !selectedWellPaths.empty() && !visibleWellPaths.empty(); } //--------------------------------------------------------------------------------------------------