mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactor: Centralized generation of path to storage of wellpaths from SSIHUB
This commit is contained in:
parent
0f9b667c55
commit
298b40d6ef
@ -21,9 +21,12 @@
|
|||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
#include "RiaPreferences.h"
|
#include "RiaPreferences.h"
|
||||||
|
|
||||||
|
#include "RimFileWellPath.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
#include "RimWellPathImport.h"
|
#include "RimWellPathImport.h"
|
||||||
|
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
#include "RiuWellImportWizard.h"
|
#include "RiuWellImportWizard.h"
|
||||||
|
|
||||||
@ -82,8 +85,7 @@ void RicWellPathsImportSsihubFeature::onActionTriggered( bool isChecked )
|
|||||||
// Update the UTM bounding box from the reservoir
|
// Update the UTM bounding box from the reservoir
|
||||||
app->project()->computeUtmAreaOfInterest();
|
app->project()->computeUtmAreaOfInterest();
|
||||||
|
|
||||||
QString wellPathsFolderPath = RimTools::getCacheRootDirectoryPathFromProject();
|
QString wellPathsFolderPath = RimFileWellPath::getCacheDirectoryPath();
|
||||||
wellPathsFolderPath += "_wellpaths";
|
|
||||||
QDir::root().mkpath( wellPathsFolderPath );
|
QDir::root().mkpath( wellPathsFolderPath );
|
||||||
|
|
||||||
if ( !app->project()->wellPathImport() ) return;
|
if ( !app->project()->wellPathImport() ) return;
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "RimWellPathImport.h"
|
#include "RimWellPathImport.h"
|
||||||
|
|
||||||
|
#include "RimFileWellPath.h"
|
||||||
#include "RimOilFieldEntry.h"
|
#include "RimOilFieldEntry.h"
|
||||||
#include "RimOilRegionEntry.h"
|
#include "RimOilRegionEntry.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
@ -224,8 +225,7 @@ RimWellPathImport::~RimWellPathImport()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellPathImport::updateFilePaths()
|
void RimWellPathImport::updateFilePaths()
|
||||||
{
|
{
|
||||||
QString wellPathsFolderPath = RimTools::getCacheRootDirectoryPathFromProject();
|
QString wellPathsFolderPath = RimFileWellPath::getCacheDirectoryPath();
|
||||||
wellPathsFolderPath += "_wellpaths";
|
|
||||||
|
|
||||||
for ( size_t regionIdx = 0; regionIdx < this->regions.size(); regionIdx++ )
|
for ( size_t regionIdx = 0; regionIdx < this->regions.size(); regionIdx++ )
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,7 @@ public:
|
|||||||
int wellPathIndexInFile() const; // -1 means none.
|
int wellPathIndexInFile() const; // -1 means none.
|
||||||
void setWellPathIndexInFile( int index );
|
void setWellPathIndexInFile( int index );
|
||||||
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath ) override;
|
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath ) override;
|
||||||
|
static QString getCacheDirectoryPath();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString surveyType()
|
QString surveyType()
|
||||||
@ -41,7 +42,6 @@ private:
|
|||||||
void setSurveyType( QString surveyType );
|
void setSurveyType( QString surveyType );
|
||||||
bool isStoredInCache();
|
bool isStoredInCache();
|
||||||
QString getCacheFileName();
|
QString getCacheFileName();
|
||||||
QString getCacheDirectoryPath();
|
|
||||||
|
|
||||||
void setupBeforeSave() override;
|
void setupBeforeSave() override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user