mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -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 "RiaApplication.h"
|
||||||
#include "RiaLogging.h"
|
#include "RiaLogging.h"
|
||||||
|
|
||||||
|
#include "RimDialogData.h"
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
#include "RimEclipseCaseCollection.h"
|
#include "RimEclipseCaseCollection.h"
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
@ -56,11 +57,12 @@ RicfExportSimWellCompletions::RicfExportSimWellCompletions()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicfExportSimWellCompletions::execute()
|
void RicfExportSimWellCompletions::execute()
|
||||||
{
|
{
|
||||||
RicExportCompletionDataSettingsUi exportSettings(false);
|
RimProject* project = RiaApplication::instance()->project();
|
||||||
exportSettings.timeStep = m_timeStep;
|
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData(false);
|
||||||
exportSettings.wellSelection = m_wellSelection;
|
exportSettings->timeStep = m_timeStep;
|
||||||
exportSettings.fileSplit = m_fileSplit;
|
exportSettings->wellSelection = m_wellSelection;
|
||||||
exportSettings.compdatExport = m_compdatExport;
|
exportSettings->fileSplit = m_fileSplit;
|
||||||
|
exportSettings->compdatExport = m_compdatExport;
|
||||||
|
|
||||||
{
|
{
|
||||||
bool foundCase = false;
|
bool foundCase = false;
|
||||||
@ -68,7 +70,7 @@ void RicfExportSimWellCompletions::execute()
|
|||||||
{
|
{
|
||||||
if (c->caseId() == m_caseId())
|
if (c->caseId() == m_caseId())
|
||||||
{
|
{
|
||||||
exportSettings.caseToApply = c;
|
exportSettings->caseToApply = c;
|
||||||
foundCase = true;
|
foundCase = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -85,11 +87,11 @@ void RicfExportSimWellCompletions::execute()
|
|||||||
{
|
{
|
||||||
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath("completions");
|
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath("completions");
|
||||||
}
|
}
|
||||||
exportSettings.folder = exportFolder;
|
exportSettings->folder = exportFolder;
|
||||||
|
|
||||||
// FIXME : Select correct view?
|
// FIXME : Select correct view?
|
||||||
RimEclipseView* view;
|
RimEclipseView* view;
|
||||||
for (RimView* v : exportSettings.caseToApply->views())
|
for (RimView* v : exportSettings->caseToApply->views())
|
||||||
{
|
{
|
||||||
view = dynamic_cast<RimEclipseView*>(v);
|
view = dynamic_cast<RimEclipseView*>(v);
|
||||||
if (view) break;
|
if (view) break;
|
||||||
@ -125,5 +127,5 @@ void RicfExportSimWellCompletions::execute()
|
|||||||
|
|
||||||
std::vector<RimWellPath*> wellPaths;
|
std::vector<RimWellPath*> wellPaths;
|
||||||
|
|
||||||
RicWellPathExportCompletionDataFeature::exportCompletions(wellPaths, simWells, exportSettings);
|
RicWellPathExportCompletionDataFeature::exportCompletions(wellPaths, simWells, *exportSettings);
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
#include "RiaLogging.h"
|
#include "RiaLogging.h"
|
||||||
|
|
||||||
|
#include "RimDialogData.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimOilField.h"
|
#include "RimOilField.h"
|
||||||
#include "RimEclipseCaseCollection.h"
|
#include "RimEclipseCaseCollection.h"
|
||||||
@ -55,14 +56,15 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicfExportWellPathCompletions::execute()
|
void RicfExportWellPathCompletions::execute()
|
||||||
{
|
{
|
||||||
RicExportCompletionDataSettingsUi exportSettings(false);
|
RimProject* project = RiaApplication::instance()->project();
|
||||||
exportSettings.timeStep = m_timeStep;
|
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData(false);
|
||||||
exportSettings.wellSelection = m_wellSelection;
|
exportSettings->timeStep = m_timeStep;
|
||||||
exportSettings.fileSplit = m_fileSplit;
|
exportSettings->wellSelection = m_wellSelection;
|
||||||
exportSettings.compdatExport = m_compdatExport;
|
exportSettings->fileSplit = m_fileSplit;
|
||||||
exportSettings.includePerforations = m_includePerforations;
|
exportSettings->compdatExport = m_compdatExport;
|
||||||
exportSettings.includeFishbones = m_includeFishbones;
|
exportSettings->includePerforations = m_includePerforations;
|
||||||
exportSettings.excludeMainBoreForFishbones = m_excludeMainBoreForFishbones;
|
exportSettings->includeFishbones = m_includeFishbones;
|
||||||
|
exportSettings->excludeMainBoreForFishbones = m_excludeMainBoreForFishbones;
|
||||||
|
|
||||||
{
|
{
|
||||||
bool foundCase = false;
|
bool foundCase = false;
|
||||||
@ -70,7 +72,7 @@ void RicfExportWellPathCompletions::execute()
|
|||||||
{
|
{
|
||||||
if (c->caseId() == m_caseId())
|
if (c->caseId() == m_caseId())
|
||||||
{
|
{
|
||||||
exportSettings.caseToApply = c;
|
exportSettings->caseToApply = c;
|
||||||
foundCase = true;
|
foundCase = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -87,7 +89,7 @@ void RicfExportWellPathCompletions::execute()
|
|||||||
{
|
{
|
||||||
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath("completions");
|
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath("completions");
|
||||||
}
|
}
|
||||||
exportSettings.folder = exportFolder;
|
exportSettings->folder = exportFolder;
|
||||||
|
|
||||||
std::vector<RimWellPath*> wellPaths;
|
std::vector<RimWellPath*> wellPaths;
|
||||||
if (m_wellPathNames().empty())
|
if (m_wellPathNames().empty())
|
||||||
@ -114,5 +116,5 @@ void RicfExportWellPathCompletions::execute()
|
|||||||
|
|
||||||
std::vector<RimSimWellInView*> simWells;
|
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);
|
RiaApplication::instance()->setLastUsedDialogDirectory("COMPLETIONS", exportSettings->folder);
|
||||||
|
|
||||||
exportCompletions(wellPaths, simWells, exportSettings);
|
exportCompletions(wellPaths, simWells, *exportSettings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user