diff --git a/ApplicationCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.cpp b/ApplicationCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.cpp index 8ff591e4a9..a75a90ae11 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.cpp @@ -69,7 +69,7 @@ RimStimPlanFractureTemplate::RimStimPlanFractureTemplate() CAF_PDM_InitObject("Fracture Template", ":/FractureTemplate16x16.png", "", ""); - CAF_PDM_InitField(&m_stimPlanFileName, "StimPlanFileName", QString(""), "File Name", "", "", ""); + CAF_PDM_InitFieldNoDefault(&m_stimPlanFileName, "StimPlanFileName", "File Name", "", "", ""); m_stimPlanFileName.uiCapability()->setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName()); CAF_PDM_InitField(&m_wellPathDepthAtFracture, "WellPathDepthAtFracture", 0.0, "Well/Fracture Intersection Depth", "", "", ""); @@ -171,9 +171,9 @@ void RimStimPlanFractureTemplate::setFileName( const QString& fileName ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -const QString& RimStimPlanFractureTemplate::fileName() +QString RimStimPlanFractureTemplate::fileName() { - return m_stimPlanFileName(); + return m_stimPlanFileName().path(); } //-------------------------------------------------------------------------------------------------- @@ -182,7 +182,7 @@ const QString& RimStimPlanFractureTemplate::fileName() void RimStimPlanFractureTemplate::updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath ) { - m_stimPlanFileName = RimTools::relocateFile( m_stimPlanFileName(), newProjectPath, oldProjectPath, nullptr, nullptr ); + // m_stimPlanFileName = RimTools::relocateFile( m_stimPlanFileName(), newProjectPath, oldProjectPath, nullptr, nullptr ); } //-------------------------------------------------------------------------------------------------- @@ -253,7 +253,7 @@ void RimStimPlanFractureTemplate::loadDataAndUpdate() if ( m_readError ) return; - m_stimPlanFractureDefinitionData = RifStimPlanXmlReader::readStimPlanXMLFile( m_stimPlanFileName(), + m_stimPlanFractureDefinitionData = RifStimPlanXmlReader::readStimPlanXMLFile( m_stimPlanFileName().path(), m_conductivityScaleFactor(), m_halfLengthScaleFactor(), m_heightScaleFactor(), diff --git a/ApplicationCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.h b/ApplicationCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.h index 177955f77b..abf76478e7 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.h +++ b/ApplicationCode/ProjectDataModel/Completions/RimStimPlanFractureTemplate.h @@ -56,8 +56,8 @@ public: void loadDataAndUpdate() override; void setDefaultsBasedOnXMLfile(); - void setFileName( const QString& fileName ); - const QString& fileName(); + void setFileName( const QString& fileName ); + QString fileName(); void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath ); @@ -130,7 +130,7 @@ private: caf::PdmField m_wellPathDepthAtFracture; caf::PdmField m_borderPolygonResultName; - caf::PdmField m_stimPlanFileName; + caf::PdmField m_stimPlanFileName; cvf::ref m_stimPlanFractureDefinitionData; cvf::ref m_fractureGrid; bool m_readError;