mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Case Groups: Added error message on missing maincase
When loading a project file, there were no error messages if the grid file could not be found.
This commit is contained in:
@@ -35,6 +35,9 @@
|
||||
#include "RigCaseCellResultsData.h"
|
||||
|
||||
#include "cafProgressInfo.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include <QMessageBox>
|
||||
#include <QDir>
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimIdenticalGridCaseGroup, "RimIdenticalGridCaseGroup");
|
||||
|
||||
@@ -156,21 +159,18 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
|
||||
// When reading active cell info, only the total cell count is tested for consistency
|
||||
|
||||
RimEclipseCase* mainCase = caseCollection()->reservoirs[0];
|
||||
mainCase->openEclipseGridFile();
|
||||
RigCaseData* rigCaseData = mainCase->reservoirData();
|
||||
if (rigCaseData)
|
||||
if (!mainCase->openReserviorCase())
|
||||
{
|
||||
RifReaderInterface::PorosityModelResultType poroModel = RifReaderInterface::MATRIX_RESULTS;
|
||||
RimReservoirCellResultsStorage* cellResultsStorage = mainCase->results(poroModel);
|
||||
|
||||
cellResultsStorage->cellResults()->createPlaceholderResultEntries();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Error message
|
||||
QMessageBox::warning(RiuMainWindow::instance(),
|
||||
"Error when opening project file",
|
||||
"Could not open the Eclipse Grid file: \n"+ mainCase->gridFileName() + "\n"+
|
||||
"Current working directory is: \n" +
|
||||
QDir::currentPath());
|
||||
return;
|
||||
}
|
||||
|
||||
RigCaseData* rigCaseData = mainCase->reservoirData();
|
||||
CVF_ASSERT(rigCaseData);
|
||||
|
||||
// Action A : Read active cell info
|
||||
// Read active cell info from all source cases. The file access is optimized for this purpose, and result meta data
|
||||
|
||||
Reference in New Issue
Block a user