mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
System : Improved handling of missing files
This commit is contained in:
parent
2a7c6fdc4a
commit
e0d7849576
@ -1964,6 +1964,8 @@ void RiaApplication::setLastUsedDialogDirectory(const QString& dialogName, const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaApplication::openFile(const QString& fileName)
|
||||
{
|
||||
if (!QFile::exists(fileName)) return false;
|
||||
|
||||
bool loadingSucceded = false;
|
||||
|
||||
if (fileName.contains(".rsp", Qt::CaseInsensitive) || fileName.contains(".rip", Qt::CaseInsensitive))
|
||||
|
@ -21,8 +21,9 @@
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QSettings>
|
||||
#include <QFileInfo>
|
||||
#include <QMessageBox>
|
||||
#include <QSettings>
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -130,6 +131,8 @@ void RiuRecentFileActionProvider::slotOpenRecentFile()
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(NULL, "File open", "Failed to import file located at\n" + filename);
|
||||
|
||||
removeFileName(filename);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user