#3952 Summary : Create plot if no plot exists when loading summary case

This commit is contained in:
Magne Sjaastad
2019-01-14 13:54:19 +01:00
parent 9124610020
commit 791a896be4
6 changed files with 104 additions and 31 deletions

View File

@@ -18,7 +18,8 @@
#include "RiaImportEclipseCaseTools.h"
#include "../SummaryPlotCommands/RicNewSummaryPlotFeature.h"
#include "SummaryPlotCommands/RicNewSummaryPlotFeature.h"
#include "SummaryPlotCommands/RicNewSummaryCurveFeature.h"
#include "RiaApplication.h"
#include "RiaLogging.h"
@@ -47,6 +48,7 @@
#include "RimSummaryCurve.h"
#include "RimSummaryCurveCollection.h"
#include "RimSummaryCurveFilter.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuMainWindow.h"
@@ -153,7 +155,11 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile(const QStringList& file
if (!newSumCases.empty())
{
RiuPlotMainWindowTools::setExpanded(newSumCases.back());
RimSummaryPlotCollection* summaryPlotColl = project->mainPlotCollection()->summaryPlotCollection();
RicNewSummaryCurveFeature::ensureAtLeastOnePlot(summaryPlotColl, newSumCases.front());
RiuPlotMainWindowTools::setExpanded(newSumCases.front());
}
}
}