Fix regression introduced in a9598f

Wrong naming of variables caused wrong refactoring
This commit is contained in:
Magne Sjaastad
2024-01-19 10:26:48 +01:00
parent 251952e6ef
commit 0c7a8ad2de

View File

@@ -828,10 +828,10 @@ bool RimGridCalculation::calculateForCases( const std::vector<RimEclipseCase*>&
RimGridCalculationVariable* v = dynamic_cast<RimGridCalculationVariable*>( m_variables[i] );
CAF_ASSERT( v != nullptr );
bool useDataFromDestinationCase = ( v->eclipseCase() == m_destinationCase );
auto sourceCase = useDataFromDestinationCase ? m_destinationCase : calculationCase;
bool useDataFromSourceCase = ( v->eclipseCase() == m_destinationCase );
auto sourceCase = useDataFromSourceCase ? calculationCase : v->eclipseCase();
auto dataForVariable = getDataForVariable( v, tsId, porosityModel, sourceCase, m_destinationCase );
auto dataForVariable = getDataForVariable( v, tsId, porosityModel, sourceCase, calculationCase );
if ( dataForVariable.empty() )
{
RiaLogging::error( QString( " No data found for variable '%1'." ).arg( v->name() ) );