From 0579c201dcbcda6c15ce234c9635ca59f83d7a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Jensen?= Date: Tue, 29 May 2018 09:01:02 +0200 Subject: [PATCH] #2995 Plot editor. Show no default curve if ensemble data is present --- .../UserInterface/RiuSummaryCurveDefSelection.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp b/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp index ab66a72c00..a94d410d83 100644 --- a/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp +++ b/ApplicationCode/UserInterface/RiuSummaryCurveDefSelection.cpp @@ -381,7 +381,11 @@ void RiuSummaryCurveDefSelection::setDefaultSelection(const std::vectorproject(); auto allSumCases = proj->allSummaryCases(); - if (allSumCases.size() > 0) + auto allSumGroups = proj->summaryGroups(); + bool hasEnsembles = std::count_if(allSumGroups.begin(), allSumGroups.end(), + [](const auto& sumGroup) { return sumGroup->isEnsemble(); }) > 0; + + if (allSumCases.size() > 0 && !hasEnsembles) { RifEclipseSummaryAddress defaultAddress = RifEclipseSummaryAddress::fieldAddress("FOPT");