mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
parent
5fe4a057ce
commit
6935ea0688
@ -761,6 +761,19 @@ void RimEclipseCase::setFilesContainingFaults(const std::vector<QString>& val)
|
||||
m_filesContainingFaultsSemColSeparated = separatedPaths;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseCase::ensureReservoirCaseIsOpen()
|
||||
{
|
||||
if (m_rigEclipseCase.notNull())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return openReserviorCase();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -69,6 +69,7 @@ public:
|
||||
std::vector<QString> filesContainingFaults() const;
|
||||
void setFilesContainingFaults(const std::vector<QString>& val);
|
||||
|
||||
bool ensureReservoirCaseIsOpen();
|
||||
bool openReserviorCase();
|
||||
virtual bool openEclipseGridFile() = 0;
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user