mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Extract path from document file name in RimProject
p4#: 21160
This commit is contained in:
parent
b9ed45af2c
commit
4ae9182fc6
@ -231,3 +231,12 @@ void RimProject::insertCaseInCaseGroup(RimIdenticalGridCaseGroup* caseGroup, Rim
|
||||
caseGroup->addCase(rimReservoir);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimProject::projectPath() const
|
||||
{
|
||||
QFileInfo fileInfo(fileName());
|
||||
return fileInfo.path();
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,6 @@ public:
|
||||
caf::PdmField<RimScriptCollection*> scriptCollection;
|
||||
|
||||
void setUserScriptPath(const QString& path);
|
||||
//void updateProjectScriptPath();
|
||||
|
||||
QString projectFileVersionString() const;
|
||||
|
||||
@ -53,6 +52,8 @@ public:
|
||||
void moveEclipseCaseIntoCaseGroup(RimCase* rimReservoir);
|
||||
void removeCaseFromAllGroups(RimCase* rimReservoir);
|
||||
|
||||
QString projectPath() const;
|
||||
|
||||
private:
|
||||
RigMainGrid* registerCaseInGridCollection(RigCaseData* rigEclipseCase);
|
||||
|
||||
@ -63,6 +64,5 @@ protected:
|
||||
|
||||
private:
|
||||
caf::PdmField<QString> m_projectFileVersionString;
|
||||
|
||||
cvf::ref<RigGridManager> m_gridCollection;
|
||||
};
|
||||
|
@ -292,13 +292,13 @@ void RimResultCase::initAfterRead()
|
||||
return;
|
||||
}
|
||||
|
||||
QString projPath = projectPath();
|
||||
QString projPath = RiaApplication::instance()->project()->projectPath();
|
||||
|
||||
candidate = QDir::fromNativeSeparators(projPath + QDir::separator() + caseName + ".EGRID");
|
||||
if (QFile::exists(candidate))
|
||||
{
|
||||
caseFileName = candidate;
|
||||
caseDirectory = projectPath;
|
||||
caseDirectory = projPath;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -312,13 +312,3 @@ void RimResultCase::initAfterRead()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimResultCase::projectPath() const
|
||||
{
|
||||
QString projectFileName = RiaApplication::instance()->project()->fileName();
|
||||
QFileInfo fileInfo(projectFileName);
|
||||
return fileInfo.path();
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,5 @@ protected:
|
||||
virtual void initAfterRead();
|
||||
|
||||
private:
|
||||
QString projectPath() const;
|
||||
|
||||
cvf::ref<RifReaderInterface> createMockModel(QString modelName);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user