#4750 Summary : Use first ensemble case if no standalone case is found

This commit is contained in:
Magne Sjaastad 2019-10-03 10:12:37 +02:00
parent 86b1264a7b
commit 5a2bea38f7

View File

@ -68,6 +68,17 @@ void RicNewSummaryCurveFeature::onActionTriggered( bool isChecked )
defaultCase = project->activeOilField()->summaryCaseMainCollection()->summaryCase( 0 );
}
if ( !defaultCase )
{
std::vector<RimSummaryCase*> allSummaryCases =
project->activeOilField()->summaryCaseMainCollection()->allSummaryCases();
if ( !allSummaryCases.empty() )
{
defaultCase = allSummaryCases.front();
}
}
RimSummaryCurve* newCurve = RicSummaryPlotFeatureImpl::addDefaultCurveToPlot( plot, defaultCase );
plot->applyDefaultCurveAppearances();