mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#846 Added Open Last Used Project feature
This commit is contained in:
@@ -1845,6 +1845,29 @@ void RiaApplication::setLastUsedDialogDirectory(const QString& dialogName, const
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaApplication::openFile(const QString& fileName)
|
||||
{
|
||||
bool loadingSucceded = false;
|
||||
|
||||
if (fileName.contains(".rsp", Qt::CaseInsensitive) || fileName.contains(".rip", Qt::CaseInsensitive))
|
||||
{
|
||||
loadingSucceded = loadProject(fileName);
|
||||
}
|
||||
else if (fileName.contains(".egrid", Qt::CaseInsensitive) || fileName.contains(".grid", Qt::CaseInsensitive))
|
||||
{
|
||||
loadingSucceded = openEclipseCaseFromFile(fileName);
|
||||
}
|
||||
else if (fileName.contains(".odb", Qt::CaseInsensitive))
|
||||
{
|
||||
loadingSucceded = openOdbCaseFromFile(fileName);
|
||||
}
|
||||
|
||||
return loadingSucceded;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -114,6 +114,7 @@ public:
|
||||
QString lastUsedDialogDirectoryWithFallback(const QString& dialogName, const QString& fallbackDirectory);
|
||||
void setLastUsedDialogDirectory(const QString& dialogName, const QString& directory);
|
||||
|
||||
bool openFile(const QString& fileName);
|
||||
bool openEclipseCaseFromFile(const QString& fileName);
|
||||
bool openEclipseCase(const QString& caseName, const QString& caseFileName);
|
||||
bool addEclipseCases(const QStringList& fileNames);
|
||||
|
||||
Reference in New Issue
Block a user