#5147 Fix RimFileWellPath::setupBeforeSave addressing the filePath

Needs to copy the cached wellpaths on save.
Split the cached filePath and the uncached filePath to only list the external well paths in the global path list, and to be able to copy the cached files on save.
This commit is contained in:
Jacob Støren
2019-12-12 16:15:24 +01:00
parent e4eea67a4e
commit 1c6c82af85
5 changed files with 62 additions and 29 deletions

View File

@@ -26,7 +26,7 @@ public:
RimFileWellPath();
~RimFileWellPath() override;
QString filepath() const;
QString filePath() const;
void setFilepath( const QString& path );
bool readWellPathFile( QString* errorMessage, RifWellPathImporter* wellPathImporter );
int wellPathIndexInFile() const; // -1 means none.
@@ -40,12 +40,13 @@ private:
return m_surveyType;
}
void setSurveyType( QString surveyType );
bool isStoredInCache();
bool isStoredInCache() const;
QString getCacheFileName();
void setupBeforeSave() override;
caf::PdmField<caf::FilePath> m_filepath;
caf::PdmField<caf::FilePath> m_filePath;
caf::PdmField<QString> m_filePathInCache; // Used for SSIHUB imported well paths
caf::PdmField<int> m_wellPathIndexInFile; // -1 means none.
caf::PdmField<QString> id;