#4018 Result management : Ensure result file is open

if no 3D views are present, make sure the result grid case file is open as part of creating a curve.
This commit is contained in:
Magne Sjaastad
2019-01-29 10:01:24 +01:00
parent 5fe4a057ce
commit 6935ea0688
3 changed files with 25 additions and 0 deletions

View File

@@ -20,6 +20,8 @@
#include "RimEclipseResultDefinition.h"
#include "RiaLogging.h"
#include "RigActiveCellInfo.h"
#include "RigCaseCellResultsData.h"
#include "RigEclipseCaseData.h"
@@ -769,6 +771,15 @@ void RimEclipseResultDefinition::loadResult()
{
if (isFlowDiagOrInjectionFlooding()) return; // Will load automatically on access
if (m_eclipseCase)
{
if (!m_eclipseCase->ensureReservoirCaseIsOpen())
{
RiaLogging::error("Could not open the Eclipse Grid file: " + m_eclipseCase->gridFileName());
return;
}
}
RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
if (gridCellResults)
{