#7940 Python : Traverse inheritance stack to find correct script class name

This commit is contained in:
Magne Sjaastad
2021-09-02 08:55:35 +02:00
parent 16ec5f793a
commit b397c230ac
5 changed files with 43 additions and 10 deletions

View File

@@ -2082,6 +2082,8 @@ std::vector<double> RimEclipseView::currentCellResultData() const
std::vector<double> resultData;
if ( currentGridCellResults() && cellResult() )
{
if ( !currentGridCellResults()->hasResultEntry( cellResult()->eclipseResultAddress() ) ) return {};
int timeStep = 0;
if ( cellResult()->hasDynamicResult() )
{
@@ -2097,7 +2099,7 @@ std::vector<double> RimEclipseView::currentCellResultData() const
//--------------------------------------------------------------------------------------------------
void RimEclipseView::setCurrentCellResultData( const std::vector<double>& values )
{
if ( currentGridCellResults() && cellResult() )
if ( !values.empty() && currentGridCellResults() && cellResult() )
{
int timeStep = 0;
if ( cellResult()->hasDynamicResult() )

View File

@@ -520,7 +520,6 @@ const RigActiveCellInfo* RigCaseCellResultsData::activeCellInfo() const
void RigCaseCellResultsData::recalculateStatistics( const RigEclipseResultAddress& resVarAddr )
{
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
CVF_TIGHT_ASSERT( scalarResultIndex < m_cellScalarResults.size() );
if ( scalarResultIndex < m_cellScalarResults.size() )
{
m_statisticsDataCache[scalarResultIndex]->clearAllStatistics();