mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
RiaPreferences: Add option to use recently used folder as default in file dialogs
This commit is contained in:
1 parent
99cf71c538
commit
570fbf111f
3 files changed
+33
-1
No files matched your search
@@ -233,6 +233,16 @@ RiaPreferences::RiaPreferences()
|
||||
CAF_PDM_InitField( &m_writeEchoInGrdeclFiles, "writeEchoInGrdeclFiles", false, "Write NOECHO and ECHO in GRDECL files" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_writeEchoInGrdeclFiles );
|
||||
|
||||
CAF_PDM_InitField( &m_useRecentlyUsedFolderAsDefault,
|
||||
"useRecentlyUsedFolderAsDefault",
|
||||
false,
|
||||
"Use Recently Used Folder/File as Default",
|
||||
"",
|
||||
"When enabled, file dialogs will open at the most recently used folder/file path. "
|
||||
"When disabled, the last used directory combined with the default filter pattern is used.",
|
||||
"" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_useRecentlyUsedFolderAsDefault );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_gridCalculationExpressionFolder, "gridCalculationExpressionFolder", "Grid Calculation Expression Folder" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_summaryCalculationExpressionFolder,
|
||||
"summaryCalculationExpressionFolder",
|
||||
@@ -504,6 +514,9 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
#endif
|
||||
else if ( uiConfigName == RiaPreferences::tabNameImportExport() )
|
||||
{
|
||||
caf::PdmUiGroup* diskOpsGroup = uiOrdering.addNewGroup( "Disk Operations" );
|
||||
diskOpsGroup->add( &m_useRecentlyUsedFolderAsDefault );
|
||||
|
||||
caf::PdmUiGroup* importGroup = uiOrdering.addNewGroup( "Import" );
|
||||
importGroup->add( &m_surfaceImportResamplingDistance );
|
||||
importGroup->add( &m_multiLateralWellPattern );
|
||||
@@ -857,6 +870,14 @@ bool RiaPreferences::writeEchoInGrdeclFiles() const
|
||||
return m_writeEchoInGrdeclFiles;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaPreferences::useRecentlyUsedFolderAsDefault() const
|
||||
{
|
||||
return m_useRecentlyUsedFolderAsDefault;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -88,6 +88,7 @@ public:
|
||||
void setLastUsedPlotTemplatePath( const QString& templatePath );
|
||||
bool openExportedPdfInViewer() const;
|
||||
bool writeEchoInGrdeclFiles() const;
|
||||
bool useRecentlyUsedFolderAsDefault() const;
|
||||
|
||||
RiaDefines::ThemeEnum guiTheme() const;
|
||||
|
||||
@@ -196,6 +197,7 @@ private:
|
||||
caf::PdmField<double> m_pageBottomMargin;
|
||||
caf::PdmField<bool> m_openExportedPdfInViewer;
|
||||
caf::PdmField<bool> m_writeEchoInGrdeclFiles;
|
||||
caf::PdmField<bool> m_useRecentlyUsedFolderAsDefault;
|
||||
|
||||
caf::PdmField<QString> m_plotTemplateFolders;
|
||||
caf::PdmField<int> m_maxPlotTemplateFoldersDepth;
|
||||
|
||||
Reference in new issue
Block a user