#5147 RimStimPlanFractureTemplate::m_stimPlanFileName -> FilePath

This commit is contained in:
Jacob Støren 2019-12-11 08:30:32 +01:00
parent eb421db040
commit 7f1ccc0169
2 changed files with 8 additions and 8 deletions

View File

@ -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(),

View File

@ -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<double> m_wellPathDepthAtFracture;
caf::PdmField<QString> m_borderPolygonResultName;
caf::PdmField<QString> m_stimPlanFileName;
caf::PdmField<caf::FilePath> m_stimPlanFileName;
cvf::ref<RigStimPlanFractureDefinition> m_stimPlanFractureDefinitionData;
cvf::ref<RigFractureGrid> m_fractureGrid;
bool m_readError;