diff --git a/ApplicationCode/Application/RiaApplication.cpp b/ApplicationCode/Application/RiaApplication.cpp index 72e818d042..ce738ee547 100644 --- a/ApplicationCode/Application/RiaApplication.cpp +++ b/ApplicationCode/Application/RiaApplication.cpp @@ -312,7 +312,7 @@ bool RiaApplication::openFile( const QString& fileName ) } else if ( fileType & RiaDefines::ANY_ECLIPSE_FILE ) { - loadingSucceded = RicImportGeneralDataFeature::openEclipseFilesFromFileNames( QStringList{fileName}, true ); + loadingSucceded = RicImportGeneralDataFeature::openEclipseFilesFromFileNames( QStringList{ fileName }, true ); lastUsedDialogTag = RiaDefines::defaultDirectoryLabel( fileType ); } @@ -450,7 +450,7 @@ bool RiaApplication::loadProject( const QString& projectFileName, // VL check regarding specific order mentioned in comment above... m_preferences->lastUsedProjectFileName = fullPathProjectFileName; - caf::PdmSettings::writeFieldsToApplicationStore( m_preferences ); + m_preferences->writePreferencesToApplicationStore(); for ( size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++ ) { @@ -707,7 +707,7 @@ bool RiaApplication::saveProjectAs( const QString& fileName, QString* errorMessa } m_preferences->lastUsedProjectFileName = fileName; - caf::PdmSettings::writeFieldsToApplicationStore( m_preferences ); + m_preferences->writePreferencesToApplicationStore(); onProjectSaved(); @@ -1186,7 +1186,8 @@ void RiaApplication::applyPreferences() this->project()->setPlotTemplateFolders( m_preferences->plotTemplateFolders() ); this->project()->updateConnectedEditors(); } - caf::PdmSettings::writeFieldsToApplicationStore( m_preferences ); + + m_preferences->writePreferencesToApplicationStore(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Application/RiaGuiApplication.cpp b/ApplicationCode/Application/RiaGuiApplication.cpp index 81dcb74378..3251d2eeef 100644 --- a/ApplicationCode/Application/RiaGuiApplication.cpp +++ b/ApplicationCode/Application/RiaGuiApplication.cpp @@ -102,7 +102,6 @@ #include "cafAppEnum.h" #include "cafEffectGenerator.h" #include "cafFixedAtlasFont.h" -#include "cafPdmSettings.h" #include "cafPdmUiModelChangeDetector.h" #include "cafPdmUiTreeView.h" #include "cafProgressInfo.h" diff --git a/ApplicationCode/Application/RiaPreferences.cpp b/ApplicationCode/Application/RiaPreferences.cpp index 6457dd2718..cc325d58f9 100644 --- a/ApplicationCode/Application/RiaPreferences.cpp +++ b/ApplicationCode/Application/RiaPreferences.cpp @@ -26,6 +26,7 @@ #include "RifReaderSettings.h" #include "cafPdmFieldCvfColor.h" +#include "cafPdmSettings.h" #include "cafPdmUiCheckBoxEditor.h" #include "cafPdmUiComboBoxEditor.h" #include "cafPdmUiFieldHandle.h" @@ -793,3 +794,11 @@ std::map RiaPreferences::de fontSizes[RiaDefines::PLOT_FONT] = defaultPlotFontSize(); return fontSizes; } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RiaPreferences::writePreferencesToApplicationStore() +{ + caf::PdmSettings::writeFieldsToApplicationStore( this ); +} diff --git a/ApplicationCode/Application/RiaPreferences.h b/ApplicationCode/Application/RiaPreferences.h index a718fccfea..975a0195b6 100644 --- a/ApplicationCode/Application/RiaPreferences.h +++ b/ApplicationCode/Application/RiaPreferences.h @@ -88,6 +88,8 @@ public: std::map defaultFontSizes() const; + void writePreferencesToApplicationStore(); + public: // Pdm Fields caf::PdmField> navigationPolicy; diff --git a/ApplicationCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.cpp b/ApplicationCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.cpp index fef142949e..4a16a4407d 100644 --- a/ApplicationCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.cpp +++ b/ApplicationCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.cpp @@ -20,8 +20,6 @@ #include "RiaRegressionTestRunner.h" -#include "cafPdmSettings.h" - #include #include diff --git a/ApplicationCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.cpp b/ApplicationCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.cpp index 0941113c94..02459e609e 100644 --- a/ApplicationCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.cpp +++ b/ApplicationCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.cpp @@ -42,7 +42,6 @@ #include "Riu3DMainWindowTools.h" #include "RiuPropertyViewTabWidget.h" -#include "cafPdmSettings.h" #include "cafPdmUiPropertyViewDialog.h" #include "cafProgressInfo.h" #include "cafSelectionManager.h" @@ -162,7 +161,7 @@ void RicExportEclipseSectorModelFeature::executeCommand( RimEclipseView* QString fileName = dirPath.absoluteFilePath( keyword + ".GRDECL" ); bool worked = RifEclipseInputFileTools::exportKeywords( fileName, view->eclipseCase()->eclipseCaseData(), - {keyword}, + { keyword }, fileWriteMode, min, max, diff --git a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp index 5cf8d0781a..7f94e3ab54 100644 --- a/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp +++ b/ApplicationCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp @@ -24,7 +24,6 @@ #include "RiuMainWindow.h" -#include "cafPdmSettings.h" #include "cafPdmUiPropertyViewDialog.h" #include diff --git a/ApplicationCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp b/ApplicationCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp index a998b01ec7..28be5ac6e2 100644 --- a/ApplicationCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp +++ b/ApplicationCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp @@ -69,6 +69,7 @@ void RicCreatePlotFromTemplateByShortcutFeature::onActionTriggered( bool isCheck fileName = fileNameSelectedInUi; RiaApplication::instance()->preferences()->setDefaultPlotTemplatePath( fileName ); + RiaApplication::instance()->preferences()->writePreferencesToApplicationStore(); } auto sumCases = RicSummaryPlotTemplateTools::selectedSummaryCases(); diff --git a/ApplicationCode/Commands/PlotTemplateCommands/RicSavePlotTemplateFeature.cpp b/ApplicationCode/Commands/PlotTemplateCommands/RicSavePlotTemplateFeature.cpp index e22f15f046..cff6110a29 100644 --- a/ApplicationCode/Commands/PlotTemplateCommands/RicSavePlotTemplateFeature.cpp +++ b/ApplicationCode/Commands/PlotTemplateCommands/RicSavePlotTemplateFeature.cpp @@ -119,6 +119,7 @@ void RicSavePlotTemplateFeature::onActionTriggered( bool isChecked ) if ( ret == QMessageBox::Yes ) { app->preferences()->appendPlotTemplateFolders( absPath ); + app->preferences()->writePreferencesToApplicationStore(); } } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp index 71c6a171da..28772625a0 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseResultCase.cpp @@ -49,7 +49,6 @@ #include "RimTimeStepFilter.h" #include "RimTools.h" -#include "cafPdmSettings.h" #include "cafPdmUiFilePathEditor.h" #include "cafPdmUiPropertyViewDialog.h" #include "cafProgressInfo.h" diff --git a/ApplicationCode/UserInterface/RiuMainWindow.cpp b/ApplicationCode/UserInterface/RiuMainWindow.cpp index 2afcca0c4e..41c4f61368 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMainWindow.cpp @@ -66,7 +66,6 @@ #include "cafCmdExecCommandManager.h" #include "cafCmdFeatureManager.h" #include "cafMemoryInspector.h" -#include "cafPdmSettings.h" #include "cafPdmUiPropertyView.h" #include "cafPdmUiPropertyViewDialog.h" #include "cafPdmUiTreeView.h"