mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge remote-tracking branch 'origin/patch-2018.08.2' into dev
This commit is contained in:
@@ -452,7 +452,7 @@ void RicExportFractureCompletionsImpl::getWellPressuresAndInitialProductionTimeS
|
||||
{
|
||||
RimSummaryCase* summaryCase = mainCollection->findSummaryCaseFromEclipseResultCase( resultCase );
|
||||
|
||||
if ( summaryCase )
|
||||
if (summaryCase && summaryCase->summaryReader())
|
||||
{
|
||||
std::vector<double> values;
|
||||
if ( summaryCase->summaryReader()->values( wbhpPressureAddress, &values ) )
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCurve* RicSummaryPlotFeatureImpl::addDefaultCurveToPlot( RimSummaryPlot* plot, RimSummaryCase* summaryCase )
|
||||
{
|
||||
if ( plot )
|
||||
if ( plot && summaryCase && summaryCase->summaryReader() )
|
||||
{
|
||||
RifEclipseSummaryAddress defaultAddressToUse;
|
||||
|
||||
@@ -486,9 +486,6 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
|
||||
{
|
||||
RimEnsembleCurveSet* curveSet = new RimEnsembleCurveSet();
|
||||
|
||||
curveSet->setSummaryCaseCollection( ensemble );
|
||||
curveSet->setSummaryAddress( addr );
|
||||
|
||||
if ( ensembleColoringStyle == PARAMETER || ensembleColoringStyle == LOG_PARAMETER )
|
||||
{
|
||||
curveSet->setColorMode( RimEnsembleCurveSet::BY_ENSEMBLE_PARAM );
|
||||
@@ -780,6 +777,9 @@ std::vector<RimSummaryCurve*> RicSummaryPlotFeatureImpl::addCurvesFromAddressFil
|
||||
{
|
||||
std::vector<RimSummaryCurve*> createdCurves;
|
||||
|
||||
if ( !plot ) return createdCurves;
|
||||
if ( !summaryCase || !summaryCase->summaryReader() ) return createdCurves;
|
||||
|
||||
std::set<RifEclipseSummaryAddress> curveAddressesToUse;
|
||||
|
||||
const std::set<RifEclipseSummaryAddress>& addrs = summaryCase->summaryReader()->allResultAddresses();
|
||||
@@ -850,4 +850,4 @@ void RicSummaryPlotFeatureImpl::filteredSummaryAdressesFromCase(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,9 +36,11 @@
|
||||
#include "Rim3dView.h"
|
||||
#include "Rim3dWellLogCurve.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimContourMapProjection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseContourMapProjection.h"
|
||||
#include "RimEclipseContourMapView.h"
|
||||
#include "RimEclipseFaultColors.h"
|
||||
#include "RimEclipsePropertyFilter.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
@@ -307,14 +309,28 @@ void RimEclipseResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* ch
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
RimEclipseContourMapView* contourMapView = nullptr;
|
||||
this->firstAncestorOrThisOfType( contourMapView );
|
||||
|
||||
if ( &m_differenceCase == changedField )
|
||||
{
|
||||
m_timeLapseBaseTimestep = RigEclipseResultAddress::noTimeLapseValue();
|
||||
|
||||
if ( contourMapView )
|
||||
{
|
||||
contourMapView->contourMapProjection()->updatedWeightingResult();
|
||||
}
|
||||
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
if ( &m_timeLapseBaseTimestep == changedField )
|
||||
{
|
||||
if ( contourMapView )
|
||||
{
|
||||
contourMapView->contourMapProjection()->updatedWeightingResult();
|
||||
}
|
||||
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
|
||||
|
||||
@@ -278,12 +278,12 @@ std::set<RifEclipseSummaryAddress> RimSummaryCaseCollection::ensembleSummaryAddr
|
||||
}
|
||||
}
|
||||
|
||||
if ( maxAddrIndex >= 0 )
|
||||
{
|
||||
const std::set<RifEclipseSummaryAddress>& addrs = m_cases[maxAddrIndex]->summaryReader()->allResultAddresses();
|
||||
addresses.insert( addrs.begin(), addrs.end() );
|
||||
}
|
||||
return addresses;
|
||||
if (maxAddrIndex >= 0 && m_cases[maxAddrIndex]->summaryReader())
|
||||
{
|
||||
const std::set<RifEclipseSummaryAddress>& addrs = m_cases[maxAddrIndex]->summaryReader()->allResultAddresses();
|
||||
addresses.insert(addrs.begin(), addrs.end());
|
||||
}
|
||||
return addresses;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -512,20 +512,20 @@ void RimSummaryCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
{
|
||||
if ( plot->timeAxisProperties()->timeMode() == RimSummaryTimeAxisProperties::DATE )
|
||||
{
|
||||
auto reader = summaryCaseY()->summaryReader();
|
||||
auto errAddress = reader->errorAddress( summaryAddressY() );
|
||||
if ( errAddress.isValid() )
|
||||
auto reader = summaryCaseY()->summaryReader();
|
||||
if (reader)
|
||||
{
|
||||
std::vector<double> errValues;
|
||||
reader->values( errAddress, &errValues );
|
||||
m_qwtPlotCurve->setSamplesFromTimeTAndYValues( curveTimeStepsY,
|
||||
curveValuesY,
|
||||
errValues,
|
||||
isLogCurve );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_qwtPlotCurve->setSamplesFromTimeTAndYValues( curveTimeStepsY, curveValuesY, isLogCurve );
|
||||
auto errAddress = reader->errorAddress(summaryAddressY());
|
||||
if (errAddress.isValid())
|
||||
{
|
||||
std::vector<double> errValues;
|
||||
reader->values(errAddress, &errValues);
|
||||
m_qwtPlotCurve->setSamplesFromTimeTAndYValues(curveTimeStepsY, curveValuesY, errValues, isLogCurve);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_qwtPlotCurve->setSamplesFromTimeTAndYValues(curveTimeStepsY, curveValuesY, isLogCurve);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -583,12 +583,12 @@ std::vector<RifSummaryReaderInterface*> RimSummaryPlotSourceStepping::summaryRea
|
||||
{
|
||||
for ( auto curve : curveCollection->curves() )
|
||||
{
|
||||
if ( isYAxisStepping() && curve->summaryCaseY() )
|
||||
if (isYAxisStepping() && curve->summaryCaseY() && curve->summaryCaseY()->summaryReader())
|
||||
{
|
||||
readers.push_back( curve->summaryCaseY()->summaryReader() );
|
||||
}
|
||||
|
||||
if ( isXAxisStepping() && curve->summaryCaseX() )
|
||||
if (isXAxisStepping() && curve->summaryCaseX() && curve->summaryCaseX()->summaryReader())
|
||||
{
|
||||
readers.push_back( curve->summaryCaseX()->summaryReader() );
|
||||
}
|
||||
@@ -604,7 +604,7 @@ std::vector<RifSummaryReaderInterface*> RimSummaryPlotSourceStepping::summaryRea
|
||||
{
|
||||
for ( auto curve : curveSet->curves() )
|
||||
{
|
||||
if ( isYAxisStepping() && curve->summaryCaseY() )
|
||||
if (isYAxisStepping() && curve->summaryCaseY() && curve->summaryCaseY()->summaryReader())
|
||||
{
|
||||
readers.push_back( curve->summaryCaseY()->summaryReader() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user