#1384 Relocate filenames containing faults when opening project

This commit is contained in:
Magne Sjaastad 2017-04-27 12:11:43 +02:00
parent 2bb2405682
commit 174d658219

View File

@ -357,6 +357,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<QString> 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)
qDebug() << searchedPaths[i];