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;
|
m_fishbonesEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicExportCompletionDataSettingsUi::enableIncludeMsw()
|
||||||
|
{
|
||||||
|
includeMsw = true;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -78,6 +78,7 @@ public:
|
|||||||
|
|
||||||
caf::PdmField<bool> includeFractures;
|
caf::PdmField<bool> includeFractures;
|
||||||
|
|
||||||
|
void enableIncludeMsw();
|
||||||
void showForSimWells();
|
void showForSimWells();
|
||||||
void showForWellPath();
|
void showForWellPath();
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
|
||||||
#include "RicExportFeatureImpl.h"
|
|
||||||
#include "ExportCommands/RicExportLgrFeature.h"
|
#include "ExportCommands/RicExportLgrFeature.h"
|
||||||
|
#include "RicExportFeatureImpl.h"
|
||||||
|
|
||||||
#include "RimDialogData.h"
|
#include "RimDialogData.h"
|
||||||
#include "RimFishbonesMultipleSubs.h"
|
#include "RimFishbonesMultipleSubs.h"
|
||||||
@ -35,6 +35,7 @@
|
|||||||
#include "RimWellPathCollection.h"
|
#include "RimWellPathCollection.h"
|
||||||
#include "RimWellPathCompletions.h"
|
#include "RimWellPathCompletions.h"
|
||||||
#include "RimWellPathFracture.h"
|
#include "RimWellPathFracture.h"
|
||||||
|
#include "RimWellPathValve.h"
|
||||||
|
|
||||||
#include "Riu3DMainWindowTools.h"
|
#include "Riu3DMainWindowTools.h"
|
||||||
|
|
||||||
@ -123,6 +124,17 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
|
|||||||
if (!wellPathPerforations.empty())
|
if (!wellPathPerforations.empty())
|
||||||
{
|
{
|
||||||
exportSettings->showPerforationsInUi(true);
|
exportSettings->showPerforationsInUi(true);
|
||||||
|
|
||||||
|
std::vector<const RimWellPathValve*> perforationValves;
|
||||||
|
for (const auto& perf : wellPathPerforations)
|
||||||
|
{
|
||||||
|
perf->descendantsIncludingThisOfType(perforationValves);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!perforationValves.empty())
|
||||||
|
{
|
||||||
|
exportSettings->enableIncludeMsw();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -184,7 +196,6 @@ void RicWellPathExportCompletionDataFeature::setupActionLook(QAction* actionToSe
|
|||||||
actionToSetup->setText("Export Completion Data for Selected Well Paths");
|
actionToSetup->setText("Export Completion Data for Selected Well Paths");
|
||||||
}
|
}
|
||||||
actionToSetup->setIcon(QIcon(":/ExportCompletionsSymbol16x16.png"));
|
actionToSetup->setIcon(QIcon(":/ExportCompletionsSymbol16x16.png"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -200,13 +211,14 @@ std::vector<RimWellPath*> RicWellPathExportCompletionDataFeature::selectedWellPa
|
|||||||
|
|
||||||
if (wellPaths.empty())
|
if (wellPaths.empty())
|
||||||
{
|
{
|
||||||
RimWellPathCompletions* completions = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellPathCompletions>();
|
RimWellPathCompletions* completions =
|
||||||
|
caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellPathCompletions>();
|
||||||
if (completions)
|
if (completions)
|
||||||
{
|
{
|
||||||
RimWellPath* wellPath = nullptr;
|
RimWellPath* wellPath = nullptr;
|
||||||
completions->firstAncestorOrThisOfTypeAsserted(wellPath);
|
completions->firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||||
wellPaths.push_back(wellPath);
|
wellPaths.push_back(wellPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return wellPaths;
|
return wellPaths;
|
||||||
|
Loading…
Reference in New Issue
Block a user