From 174d65821951af4f3f2614086eda0ed4bb1c36b5 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 27 Apr 2017 12:11:43 +0200 Subject: [PATCH] #1384 Relocate filenames containing faults when opening project --- .../ProjectDataModel/RimEclipseResultCase.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp index 3bf93c0448..3432d203e7 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp @@ -356,6 +356,15 @@ void RimEclipseResultCase::updateFilePathsFromProjectPath(const QString& newProj // Update filename and folder paths when opening project from a different file location caseFileName = RimTools::relocateFile(caseFileName(), newProjectPath, oldProjectPath, &foundFile, &searchedPaths); + + std::vector relocatedFaultFiles; + for (auto faultFileName : filesContainingFaults()) + { + QString relocatedFaultFile = RimTools::relocateFile(faultFileName, newProjectPath, oldProjectPath, &foundFile, &searchedPaths); + relocatedFaultFiles.push_back(relocatedFaultFile); + } + + filesContainingFaults = relocatedFaultFiles; #if 0 // Output the search path for debugging for (size_t i = 0; i < searchedPaths.size(); ++i)