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

This commit is contained in:
Magne Sjaastad committed 2019-10-03 10:12:50 +02:00
1 parent 86b1264a7b
commit 5a2bea38f7
1 file changed
+11
@@ -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();