mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#791) Update well path filename if project file is relocated
This commit is contained in:
@@ -365,13 +365,20 @@ bool RimWellPath::isStoredInCache()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::updateFilePathsFromProjectPath()
|
||||
void RimWellPath::updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath)
|
||||
{
|
||||
QString newCacheFileName = getCacheFileName();
|
||||
|
||||
if (QFile::exists(newCacheFileName))
|
||||
if (isStoredInCache())
|
||||
{
|
||||
filepath = newCacheFileName;
|
||||
QString newCacheFileName = getCacheFileName();
|
||||
|
||||
if (QFile::exists(newCacheFileName))
|
||||
{
|
||||
filepath = newCacheFileName;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
filepath = RimTools::relocateFile(filepath(), newProjectPath, oldProjectPath, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user