mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
#1903 Export completions. Use project's export completion dialog settings everywhere it's being used
This commit is contained in:
parent
a05f357597
commit
a2a2427062
@ -23,6 +23,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RimDialogData.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
#include "RimEclipseView.h"
|
||||
@ -56,11 +57,12 @@ RicfExportSimWellCompletions::RicfExportSimWellCompletions()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfExportSimWellCompletions::execute()
|
||||
{
|
||||
RicExportCompletionDataSettingsUi exportSettings(false);
|
||||
exportSettings.timeStep = m_timeStep;
|
||||
exportSettings.wellSelection = m_wellSelection;
|
||||
exportSettings.fileSplit = m_fileSplit;
|
||||
exportSettings.compdatExport = m_compdatExport;
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData(false);
|
||||
exportSettings->timeStep = m_timeStep;
|
||||
exportSettings->wellSelection = m_wellSelection;
|
||||
exportSettings->fileSplit = m_fileSplit;
|
||||
exportSettings->compdatExport = m_compdatExport;
|
||||
|
||||
{
|
||||
bool foundCase = false;
|
||||
@ -68,7 +70,7 @@ void RicfExportSimWellCompletions::execute()
|
||||
{
|
||||
if (c->caseId() == m_caseId())
|
||||
{
|
||||
exportSettings.caseToApply = c;
|
||||
exportSettings->caseToApply = c;
|
||||
foundCase = true;
|
||||
break;
|
||||
}
|
||||
@ -85,11 +87,11 @@ void RicfExportSimWellCompletions::execute()
|
||||
{
|
||||
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath("completions");
|
||||
}
|
||||
exportSettings.folder = exportFolder;
|
||||
exportSettings->folder = exportFolder;
|
||||
|
||||
// FIXME : Select correct view?
|
||||
RimEclipseView* view;
|
||||
for (RimView* v : exportSettings.caseToApply->views())
|
||||
for (RimView* v : exportSettings->caseToApply->views())
|
||||
{
|
||||
view = dynamic_cast<RimEclipseView*>(v);
|
||||
if (view) break;
|
||||
@ -125,5 +127,5 @@ void RicfExportSimWellCompletions::execute()
|
||||
|
||||
std::vector<RimWellPath*> wellPaths;
|
||||
|
||||
RicWellPathExportCompletionDataFeature::exportCompletions(wellPaths, simWells, exportSettings);
|
||||
RicWellPathExportCompletionDataFeature::exportCompletions(wellPaths, simWells, *exportSettings);
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RimDialogData.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
@ -55,14 +56,15 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfExportWellPathCompletions::execute()
|
||||
{
|
||||
RicExportCompletionDataSettingsUi exportSettings(false);
|
||||
exportSettings.timeStep = m_timeStep;
|
||||
exportSettings.wellSelection = m_wellSelection;
|
||||
exportSettings.fileSplit = m_fileSplit;
|
||||
exportSettings.compdatExport = m_compdatExport;
|
||||
exportSettings.includePerforations = m_includePerforations;
|
||||
exportSettings.includeFishbones = m_includeFishbones;
|
||||
exportSettings.excludeMainBoreForFishbones = m_excludeMainBoreForFishbones;
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData(false);
|
||||
exportSettings->timeStep = m_timeStep;
|
||||
exportSettings->wellSelection = m_wellSelection;
|
||||
exportSettings->fileSplit = m_fileSplit;
|
||||
exportSettings->compdatExport = m_compdatExport;
|
||||
exportSettings->includePerforations = m_includePerforations;
|
||||
exportSettings->includeFishbones = m_includeFishbones;
|
||||
exportSettings->excludeMainBoreForFishbones = m_excludeMainBoreForFishbones;
|
||||
|
||||
{
|
||||
bool foundCase = false;
|
||||
@ -70,7 +72,7 @@ void RicfExportWellPathCompletions::execute()
|
||||
{
|
||||
if (c->caseId() == m_caseId())
|
||||
{
|
||||
exportSettings.caseToApply = c;
|
||||
exportSettings->caseToApply = c;
|
||||
foundCase = true;
|
||||
break;
|
||||
}
|
||||
@ -87,7 +89,7 @@ void RicfExportWellPathCompletions::execute()
|
||||
{
|
||||
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath("completions");
|
||||
}
|
||||
exportSettings.folder = exportFolder;
|
||||
exportSettings->folder = exportFolder;
|
||||
|
||||
std::vector<RimWellPath*> wellPaths;
|
||||
if (m_wellPathNames().empty())
|
||||
@ -114,5 +116,5 @@ void RicfExportWellPathCompletions::execute()
|
||||
|
||||
std::vector<RimSimWellInView*> simWells;
|
||||
|
||||
RicWellPathExportCompletionDataFeature::exportCompletions(wellPaths, simWells, exportSettings);
|
||||
RicWellPathExportCompletionDataFeature::exportCompletions(wellPaths, simWells, *exportSettings);
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ void RicWellPathExportCompletionDataFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RiaApplication::instance()->setLastUsedDialogDirectory("COMPLETIONS", exportSettings->folder);
|
||||
|
||||
exportCompletions(wellPaths, simWells, exportSettings);
|
||||
exportCompletions(wellPaths, simWells, *exportSettings);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user