#7519 Curve calculator: Assign unique ID after copy of calculation

Avoid duplicate entries in summary selection dialog
This commit is contained in:
Magne Sjaastad 2021-03-26 11:19:10 +01:00
parent b673fe2600
commit fd8d38c4f0
2 changed files with 7 additions and 1 deletions

View File

@ -88,6 +88,8 @@ RimSummaryCalculation* RimSummaryCalculationCollection::addCalculationCopy( cons
expression.replace( currVarName, newVarName );
calcCopy->setExpression( expression );
RimProject::current()->assignCalculationIdToCalculation( calcCopy );
m_calculations.push_back( calcCopy );
calcCopy->resolveReferencesRecursively();

View File

@ -1036,7 +1036,11 @@ std::set<RifEclipseSummaryAddress> RiuSummaryVectorSelectionUi::findPossibleSumm
if ( sumCase )
{
if ( !isObservedData( sumCase ) ) sources.push_back( sumCase );
auto calculated = dynamic_cast<RimCalculatedSummaryCase*>( sumCase );
if ( !isObservedData( sumCase ) && !calculated )
{
sources.push_back( sumCase );
}
}
else if ( ensemble )
{