mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1030 Don't automatically create summary plots of preference is turned off
This commit is contained in:
parent
bd47826608
commit
327fb31cb0
@ -86,7 +86,7 @@ RiaPreferences::RiaPreferences(void)
|
|||||||
CAF_PDM_InitFieldNoDefault(&readerSettings, "readerSettings", "Reader settings", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&readerSettings, "readerSettings", "Reader settings", "", "", "");
|
||||||
readerSettings = new RifReaderSettings;
|
readerSettings = new RifReaderSettings;
|
||||||
|
|
||||||
CAF_PDM_InitField(&autoCreatePlotsOnImport, "AutoCreatePlotsOnImport", true, "Create Summary Plots When Importing Eclipse Case", "", "", "");
|
CAF_PDM_InitField(&autoCreatePlotsOnImport, "AutoCreatePlotsOnImport", true, "Automatically Create Summary Plots On Import", "", "", "");
|
||||||
autoCreatePlotsOnImport.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
autoCreatePlotsOnImport.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
||||||
|
|
||||||
CAF_PDM_InitField(&defaultCurveFilter, "DefaultCurveFilter", QString("F*PT"), "Default Vector Selection Filter", "", "", "");
|
CAF_PDM_InitField(&defaultCurveFilter, "DefaultCurveFilter", QString("F*PT"), "Default Vector Selection Filter", "", "", "");
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "RicImportSummaryCaseFeature.h"
|
#include "RicImportSummaryCaseFeature.h"
|
||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
#include "RiaPreferences.h"
|
||||||
|
|
||||||
#include "RimGridSummaryCase.h"
|
#include "RimGridSummaryCase.h"
|
||||||
#include "RimMainPlotCollection.h"
|
#include "RimMainPlotCollection.h"
|
||||||
@ -102,10 +103,14 @@ bool RicImportSummaryCaseFeature::createAndAddSummaryCaseFromFile(const QString&
|
|||||||
RimSummaryCase* newSumCase = sumCaseColl->createAndAddSummaryCaseFromFileName(fileName);
|
RimSummaryCase* newSumCase = sumCaseColl->createAndAddSummaryCaseFromFileName(fileName);
|
||||||
newSumCase->loadCase();
|
newSumCase->loadCase();
|
||||||
|
|
||||||
|
|
||||||
|
if (app->preferences()->autoCreatePlotsOnImport())
|
||||||
|
{
|
||||||
RimMainPlotCollection* mainPlotColl = proj->mainPlotCollection();
|
RimMainPlotCollection* mainPlotColl = proj->mainPlotCollection();
|
||||||
RimSummaryPlotCollection* summaryPlotColl = mainPlotColl->summaryPlotCollection();
|
RimSummaryPlotCollection* summaryPlotColl = mainPlotColl->summaryPlotCollection();
|
||||||
|
|
||||||
RicNewSummaryPlotFeature::createNewSummaryPlot(summaryPlotColl, newSumCase);
|
RicNewSummaryPlotFeature::createNewSummaryPlot(summaryPlotColl, newSumCase);
|
||||||
|
}
|
||||||
|
|
||||||
sumCaseColl->updateConnectedEditors();
|
sumCaseColl->updateConnectedEditors();
|
||||||
app->addToRecentFiles(fileName);
|
app->addToRecentFiles(fileName);
|
||||||
|
Loading…
Reference in New Issue
Block a user