mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1732 Update path to StimPlan xml if required
This commit is contained in:
parent
f2c20db534
commit
bf3636a9df
@ -126,3 +126,18 @@ void RimFractureTemplateCollection::loadAndUpdateData()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplateCollection::updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath)
|
||||
{
|
||||
for (RimFractureTemplate* f : fractureDefinitions())
|
||||
{
|
||||
RimStimPlanFractureTemplate* stimPlanFracture = dynamic_cast<RimStimPlanFractureTemplate*>(f);
|
||||
if (stimPlanFracture)
|
||||
{
|
||||
stimPlanFracture->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,4 +48,5 @@ public:
|
||||
void deleteFractureDefinitions();
|
||||
void loadAndUpdateData();
|
||||
|
||||
void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
||||
};
|
||||
|
@ -21,16 +21,19 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RifStimPlanXmlReader.h"
|
||||
|
||||
#include "RigStimPlanFractureDefinition.h"
|
||||
#include "RigFractureGrid.h"
|
||||
|
||||
#include "RigFractureCell.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimFracture.h"
|
||||
#include "RimFractureContainment.h"
|
||||
#include "RimProject.h"
|
||||
#include "RigFractureCell.h"
|
||||
#include "RimStimPlanColors.h"
|
||||
#include "RimStimPlanLegendConfig.h"
|
||||
#include "RimFractureContainment.h"
|
||||
#include "RimTools.h"
|
||||
|
||||
#include "RivWellFracturePartMgr.h"
|
||||
|
||||
@ -46,7 +49,6 @@
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include "RifStimPlanXmlReader.h"
|
||||
|
||||
|
||||
|
||||
@ -178,6 +180,13 @@ QString RimStimPlanFractureTemplate::fileNameWithOutPath()
|
||||
return stimplanfileFileInfo.fileName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanFractureTemplate::updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath)
|
||||
{
|
||||
m_stimPlanFileName = RimTools::relocateFile(m_stimPlanFileName(), newProjectPath, oldProjectPath, nullptr, nullptr);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
@ -62,6 +62,9 @@ public:
|
||||
const QString& fileName();
|
||||
QString fileNameWithOutPath();
|
||||
|
||||
void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
||||
|
||||
|
||||
// Fracture geometry
|
||||
|
||||
const RigFractureGrid* fractureGrid() const;
|
||||
|
@ -438,6 +438,9 @@ void RimProject::setProjectFileNameAndUpdateDependencies(const QString& fileName
|
||||
if (oilField->summaryCaseCollection() != NULL) {
|
||||
oilField->summaryCaseCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
|
||||
}
|
||||
|
||||
CVF_ASSERT(oilField->fractureDefinitionCollection());
|
||||
oilField->fractureDefinitionCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user