diff --git a/ApplicationCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.cpp b/ApplicationCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.cpp index bd5fab7391..d047c5f332 100644 --- a/ApplicationCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.cpp +++ b/ApplicationCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.cpp @@ -113,6 +113,14 @@ RicExportCompletionDataSettingsUi::RicExportCompletionDataSettingsUi() m_fishbonesEnabled = true; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RicExportCompletionDataSettingsUi::enableIncludeMsw() +{ + includeMsw = true; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.h b/ApplicationCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.h index 9ddedbc6af..f9c72863d6 100644 --- a/ApplicationCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.h +++ b/ApplicationCode/Commands/CompletionExportCommands/RicExportCompletionDataSettingsUi.h @@ -78,6 +78,7 @@ public: caf::PdmField includeFractures; + void enableIncludeMsw(); void showForSimWells(); void showForWellPath(); diff --git a/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp b/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp index 9d8d65d58d..d9d09ecfc2 100644 --- a/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp +++ b/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp @@ -21,8 +21,8 @@ #include "RiaApplication.h" -#include "RicExportFeatureImpl.h" #include "ExportCommands/RicExportLgrFeature.h" +#include "RicExportFeatureImpl.h" #include "RimDialogData.h" #include "RimFishbonesMultipleSubs.h" @@ -35,6 +35,7 @@ #include "RimWellPathCollection.h" #include "RimWellPathCompletions.h" #include "RimWellPathFracture.h" +#include "RimWellPathValve.h" #include "Riu3DMainWindowTools.h" @@ -123,6 +124,17 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl if (!wellPathPerforations.empty()) { exportSettings->showPerforationsInUi(true); + + std::vector perforationValves; + for (const auto& perf : wellPathPerforations) + { + perf->descendantsIncludingThisOfType(perforationValves); + } + + if (!perforationValves.empty()) + { + exportSettings->enableIncludeMsw(); + } } else { @@ -184,7 +196,6 @@ void RicWellPathExportCompletionDataFeature::setupActionLook(QAction* actionToSe actionToSetup->setText("Export Completion Data for Selected Well Paths"); } actionToSetup->setIcon(QIcon(":/ExportCompletionsSymbol16x16.png")); - } //-------------------------------------------------------------------------------------------------- @@ -200,13 +211,14 @@ std::vector RicWellPathExportCompletionDataFeature::selectedWellPa if (wellPaths.empty()) { - RimWellPathCompletions* completions = caf::SelectionManager::instance()->selectedItemAncestorOfType(); + RimWellPathCompletions* completions = + caf::SelectionManager::instance()->selectedItemAncestorOfType(); if (completions) { RimWellPath* wellPath = nullptr; completions->firstAncestorOrThisOfTypeAsserted(wellPath); wellPaths.push_back(wellPath); - } + } } return wellPaths;