mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
3D cross plot : Make sure the grid file is loaded before accessing data
This commit is contained in:
parent
287ff64fc2
commit
6b3808b696
@ -17,6 +17,8 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
#include "RimGridCrossPlotCurveSet.h"
|
#include "RimGridCrossPlotCurveSet.h"
|
||||||
|
|
||||||
|
#include "RiaLogging.h"
|
||||||
|
|
||||||
#include "RigActiveCellInfo.h"
|
#include "RigActiveCellInfo.h"
|
||||||
#include "RigActiveCellsResultAccessor.h"
|
#include "RigActiveCellsResultAccessor.h"
|
||||||
#include "RigCaseCellResultCalculator.h"
|
#include "RigCaseCellResultCalculator.h"
|
||||||
@ -181,6 +183,13 @@ void RimGridCrossPlotCurveSet::onLoadDataAndUpdate(bool updateParentPlot)
|
|||||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case.value());
|
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case.value());
|
||||||
if (eclipseCase)
|
if (eclipseCase)
|
||||||
{
|
{
|
||||||
|
if (!eclipseCase->ensureReservoirCaseIsOpen())
|
||||||
|
{
|
||||||
|
RiaLogging::warning(QString("Failed to open eclipse grid file %1").arg(eclipseCase->gridFileName()));
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RigCaseCellResultsData* resultData = eclipseCase->results(RiaDefines::MATRIX_MODEL);
|
RigCaseCellResultsData* resultData = eclipseCase->results(RiaDefines::MATRIX_MODEL);
|
||||||
|
|
||||||
RigEclipseResultAddress xAddress(m_xAxisProperty->resultType(), m_xAxisProperty->resultVariable());
|
RigEclipseResultAddress xAddress(m_xAxisProperty->resultType(), m_xAxisProperty->resultVariable());
|
||||||
|
Loading…
Reference in New Issue
Block a user