@@ -233,6 +233,16 @@ RiaPreferences::RiaPreferences()
233233 CAF_PDM_InitField ( &m_writeEchoInGrdeclFiles, " writeEchoInGrdeclFiles" , false , " Write NOECHO and ECHO in GRDECL files" );
234234 caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor ( &m_writeEchoInGrdeclFiles );
235235
236+ CAF_PDM_InitField ( &m_useRecentlyUsedFolderAsDefault,
237+ " useRecentlyUsedFolderAsDefault" ,
238+ false ,
239+ " Use Recently Used Folder/File as Default" ,
240+ " " ,
241+ " When enabled, file dialogs will open at the most recently used folder/file path. "
242+ " When disabled, the last used directory combined with the default filter pattern is used." ,
243+ " " );
244+ caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor ( &m_useRecentlyUsedFolderAsDefault );
245+
236246 CAF_PDM_InitFieldNoDefault ( &m_gridCalculationExpressionFolder, " gridCalculationExpressionFolder" , " Grid Calculation Expression Folder" );
237247 CAF_PDM_InitFieldNoDefault ( &m_summaryCalculationExpressionFolder,
238248 " summaryCalculationExpressionFolder" ,
@@ -504,6 +514,9 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
504514#endif
505515 else if ( uiConfigName == RiaPreferences::tabNameImportExport () )
506516 {
517+ caf::PdmUiGroup* diskOpsGroup = uiOrdering.addNewGroup ( " Disk Operations" );
518+ diskOpsGroup->add ( &m_useRecentlyUsedFolderAsDefault );
519+
507520 caf::PdmUiGroup* importGroup = uiOrdering.addNewGroup ( " Import" );
508521 importGroup->add ( &m_surfaceImportResamplingDistance );
509522 importGroup->add ( &m_multiLateralWellPattern );
@@ -857,6 +870,14 @@ bool RiaPreferences::writeEchoInGrdeclFiles() const
857870 return m_writeEchoInGrdeclFiles;
858871}
859872
873+ // --------------------------------------------------------------------------------------------------
874+ // /
875+ // --------------------------------------------------------------------------------------------------
876+ bool RiaPreferences::useRecentlyUsedFolderAsDefault () const
877+ {
878+ return m_useRecentlyUsedFolderAsDefault;
879+ }
880+
860881// --------------------------------------------------------------------------------------------------
861882// /
862883// --------------------------------------------------------------------------------------------------
0 commit comments