mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-11 07:56:08 -06:00
Merge pull request #4812 from OPM/use-first-ensemble-case
#4750 Summary : Use first ensemble case if no standalone case is found
This commit is contained in:
commit
1e2e02c9ac
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user