mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4354 Export Completion Data: Auto-select "MSW" in GUI when Valves are exported
This commit is contained in:
parent
521e170178
commit
1adbc499d6
@ -113,6 +113,14 @@ RicExportCompletionDataSettingsUi::RicExportCompletionDataSettingsUi()
|
||||
m_fishbonesEnabled = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportCompletionDataSettingsUi::enableIncludeMsw()
|
||||
{
|
||||
includeMsw = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -78,6 +78,7 @@ public:
|
||||
|
||||
caf::PdmField<bool> includeFractures;
|
||||
|
||||
void enableIncludeMsw();
|
||||
void showForSimWells();
|
||||
void showForWellPath();
|
||||
|
||||
|
@ -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<const RimWellPathValve*> 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<RimWellPath*> RicWellPathExportCompletionDataFeature::selectedWellPa
|
||||
|
||||
if (wellPaths.empty())
|
||||
{
|
||||
RimWellPathCompletions* completions = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellPathCompletions>();
|
||||
RimWellPathCompletions* completions =
|
||||
caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellPathCompletions>();
|
||||
if (completions)
|
||||
{
|
||||
RimWellPath* wellPath = nullptr;
|
||||
completions->firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
wellPaths.push_back(wellPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return wellPaths;
|
||||
|
Loading…
Reference in New Issue
Block a user