#4003 Refactoring to prepare for preferences based default summary plot curves

This commit is contained in:
Jacob Støren
2019-08-09 09:54:55 +02:00
parent 4ed30ad4af
commit e915c8e18c
13 changed files with 163 additions and 91 deletions

View File

@@ -44,6 +44,7 @@
#include "SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h"
#include "SummaryPlotCommands/RicNewSummaryPlotFeature.h"
#include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h"
#include "cafProgressInfo.h"
#include "cafSelectionManagerTools.h"
@@ -83,7 +84,7 @@ void RicImportSummaryCasesFeature::onActionTriggered(bool isChecked)
addSummaryCases(cases);
if (!cases.empty())
{
createNewPlot(cases.front());
RicSummaryPlotFeatureImpl::createDefaultSummaryPlot(cases.front());
}
addCasesToGroupIfRelevant(cases);
@@ -132,7 +133,7 @@ bool RicImportSummaryCasesFeature::createAndAddSummaryCasesFromFiles(const QStri
addSummaryCases(*cases);
if (!cases->empty())
{
createNewPlot(cases->back());
RicSummaryPlotFeatureImpl::createDefaultSummaryPlot(cases->back());
}
RiuPlotMainWindow* mainPlotWindow = app->getOrCreateAndShowMainPlotWindow();
@@ -232,17 +233,6 @@ void RicImportSummaryCasesFeature::addCasesToGroupIfRelevant(const std::vector<R
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicImportSummaryCasesFeature::createNewPlot(RimSummaryCase* summaryCase)
{
RiaApplication* app = RiaApplication::instance();
RimProject* proj = app->project();
RicNewSummaryCurveFeature::createNewPlot(proj->mainPlotCollection->summaryPlotCollection(), summaryCase);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------