#1444 Reallocate summary case file names when opening project

This commit is contained in:
Bjørnar Grip Fjær
2017-05-03 12:31:45 +02:00
parent 15d3e08f70
commit 3fc0a59f06
8 changed files with 44 additions and 9 deletions

View File

@@ -417,20 +417,20 @@ void RimProject::setProjectFileNameAndUpdateDependencies(const QString& fileName
}
// Update path to well path file cache
for (size_t oilFieldIdx = 0; oilFieldIdx < oilFields().size(); oilFieldIdx++)
{
RimOilField* oilField = oilFields[oilFieldIdx];
if (oilField == NULL || oilField->wellPathCollection == NULL) continue;
oilField->wellPathCollection->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
}
for(RimOilField* oilField: oilFields)
{
if(oilField == NULL) continue;
if(oilField->formationNamesCollection() != NULL)
if (oilField == NULL) continue;
if (oilField->wellPathCollection() != NULL)
{
oilField->wellPathCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
}
if (oilField->formationNamesCollection() != NULL)
{
oilField->formationNamesCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
}
if (oilField->summaryCaseCollection() != NULL) {
oilField->summaryCaseCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
}
}