mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge branch '2018.01.01-patch' into dev
This commit is contained in:
commit
cc97baa9cb
@ -52,6 +52,8 @@
|
|||||||
#include "RimMultiSnapshotDefinition.h"
|
#include "RimMultiSnapshotDefinition.h"
|
||||||
#include "RimObservedDataCollection.h"
|
#include "RimObservedDataCollection.h"
|
||||||
#include "RimOilField.h"
|
#include "RimOilField.h"
|
||||||
|
#include "RimPltPlotCollection.h"
|
||||||
|
#include "RimRftPlotCollection.h"
|
||||||
#include "RimScriptCollection.h"
|
#include "RimScriptCollection.h"
|
||||||
#include "RimSummaryCaseMainCollection.h"
|
#include "RimSummaryCaseMainCollection.h"
|
||||||
#include "RimSummaryCrossPlotCollection.h"
|
#include "RimSummaryCrossPlotCollection.h"
|
||||||
@ -59,12 +61,11 @@
|
|||||||
#include "RimView.h"
|
#include "RimView.h"
|
||||||
#include "RimViewLinker.h"
|
#include "RimViewLinker.h"
|
||||||
#include "RimViewLinkerCollection.h"
|
#include "RimViewLinkerCollection.h"
|
||||||
|
#include "RimWellLogFile.h"
|
||||||
#include "RimWellLogPlotCollection.h"
|
#include "RimWellLogPlotCollection.h"
|
||||||
#include "RimRftPlotCollection.h"
|
#include "RimWellPath.h"
|
||||||
#include "RimPltPlotCollection.h"
|
|
||||||
#include "RimWellPathCollection.h"
|
#include "RimWellPathCollection.h"
|
||||||
#include "RimWellPathImport.h"
|
#include "RimWellPathImport.h"
|
||||||
#include "RimWellPath.h"
|
|
||||||
|
|
||||||
#include "RiuMainWindow.h"
|
#include "RiuMainWindow.h"
|
||||||
#include "RiuMainPlotWindow.h"
|
#include "RiuMainPlotWindow.h"
|
||||||
@ -470,6 +471,15 @@ void RimProject::setProjectFileNameAndUpdateDependencies(const QString& fileName
|
|||||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
std::vector<RimWellLogFile*> rimWellLogFiles;
|
||||||
|
this->descendantsIncludingThisOfType(rimWellLogFiles);
|
||||||
|
|
||||||
|
for (auto rimWellLogFile : rimWellLogFiles)
|
||||||
|
{
|
||||||
|
rimWellLogFile->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wellPathImport->updateFilePaths();
|
wellPathImport->updateFilePaths();
|
||||||
}
|
}
|
||||||
|
@ -243,6 +243,21 @@ bool RimWellLogFile::hasFlowData() const
|
|||||||
return RimWellPlotTools::hasFlowData(this);
|
return RimWellPlotTools::hasFlowData(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogFile::updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath)
|
||||||
|
{
|
||||||
|
bool foundFile = false;
|
||||||
|
std::vector<QString> searchedPaths;
|
||||||
|
|
||||||
|
QString fileNameCandidate = RimTools::relocateFile(m_fileName(), newProjectPath, oldProjectPath, &foundFile, &searchedPaths);
|
||||||
|
if (foundFile)
|
||||||
|
{
|
||||||
|
m_fileName = fileNameCandidate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -72,6 +72,8 @@ public:
|
|||||||
|
|
||||||
RimWellLogFile::WellFlowCondition wellFlowRateCondition() const { return m_wellFlowCondition(); }
|
RimWellLogFile::WellFlowCondition wellFlowRateCondition() const { return m_wellFlowCondition(); }
|
||||||
|
|
||||||
|
void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void setupBeforeSave() override;
|
virtual void setupBeforeSave() override;
|
||||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||||
|
@ -621,6 +621,18 @@ void RimWellPath::updateFilePathsFromProjectPath(const QString& newProjectPath,
|
|||||||
{
|
{
|
||||||
filepath = RimTools::relocateFile(filepath(), newProjectPath, oldProjectPath, nullptr, nullptr);
|
filepath = RimTools::relocateFile(filepath(), newProjectPath, oldProjectPath, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
bool foundFile = false;
|
||||||
|
std::vector<QString> searchedPaths;
|
||||||
|
|
||||||
|
QString fileNameCandidate = RimTools::relocateFile(m_wellPathFormationFilePath, newProjectPath, oldProjectPath, &foundFile, &searchedPaths);
|
||||||
|
if (foundFile)
|
||||||
|
{
|
||||||
|
m_wellPathFormationFilePath = fileNameCandidate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user