(#537) Showing error message box if opening a LAS file fails

This commit is contained in:
Pål Hagen
2015-09-24 09:37:26 +02:00
parent 71e74599ff
commit 5d18209e26
4 changed files with 28 additions and 4 deletions

View File

@@ -27,8 +27,11 @@
#include "RimWellPathCollection.h"
#include "RivWellPathPartMgr.h"
#include "RiuMainWindow.h"
#include <QDir>
#include <QFileInfo>
#include <QMessageBox>
CAF_PDM_SOURCE_INIT(RimWellPath, "WellPath");
@@ -187,6 +190,12 @@ RimWellLogFile* RimWellPath::readWellLogFile(const QString& logFilePath)
wellLogFile->setFileName(logFilePath);
if (!wellLogFile->readFile())
{
QString errorMessage = "Could not open the LAS file: \n" + logFilePath;
QMessageBox::warning(RiuMainWindow::instance(),
"File open error",
errorMessage);
delete wellLogFile;
wellLogFile = NULL;
}