mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4722 Summary Plot Editor : Set the current category to the first selected category
This commit is contained in:
parent
cba51615d8
commit
b92618ebd3
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user