mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-20 21:43:20 -06:00
#3717 Plot editor. Never plot a default vector
This commit is contained in:
parent
5354caef13
commit
e98b1728f1
@ -421,13 +421,10 @@ void RiuSummaryCurveDefSelection::setDefaultSelection(const std::vector<SummaryS
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
auto allSumCases = proj->allSummaryCases();
|
||||
auto allSumGroups = proj->summaryGroups();
|
||||
bool hasEnsembles = std::count_if(allSumGroups.begin(), allSumGroups.end(),
|
||||
[](const RimSummaryCaseCollection* sumGroup) { return sumGroup->isEnsemble(); }) > 0;
|
||||
|
||||
if (allSumCases.size() > 0)
|
||||
{
|
||||
RifEclipseSummaryAddress defaultAddress = !hasEnsembles ?
|
||||
RifEclipseSummaryAddress::fieldAddress("FOPT") : RifEclipseSummaryAddress();
|
||||
RifEclipseSummaryAddress defaultAddress = RifEclipseSummaryAddress();
|
||||
|
||||
std::vector<SummarySource*> selectTheseSources = defaultSources;
|
||||
if (selectTheseSources.empty()) selectTheseSources.push_back(allSumCases[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user