#4722 Summary Plot Editor : Set the current category to the first selected category

This commit is contained in:
Magne Sjaastad 2019-09-20 09:45:15 +02:00
parent cba51615d8
commit b92618ebd3

View File

@ -605,6 +605,7 @@ void RiuSummaryCurveDefSelection::setSelectedCurveDefinitions( const std::vector
{
resetAllFields();
std::set<RifEclipseSummaryAddress::SummaryVarCategory> categories;
for ( const auto& curveDef : curveDefinitions )
{
if ( !( curveDef.summaryCase() || curveDef.isEnsembleCurve() ) ) continue;
@ -664,6 +665,14 @@ void RiuSummaryCurveDefSelection::setSelectedCurveDefinitions( const std::vector
( *identifierAndField->pdmField() ) = newSelectionVector;
}
}
categories.insert( curveDef.summaryAddress().category() );
}
if ( !categories.empty() )
{
RifEclipseSummaryAddress::SummaryVarCategory cat = *( categories.begin() );
m_currentSummaryCategory.setValue( cat );
}
}