mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #4967 from OPM/improve-export-filedialog-behaviour
Improve export filedialog behaviour
This commit is contained in:
commit
7d817d0277
@ -58,7 +58,7 @@ void RicImportPolylinesAnnotationFeature::onActionTriggered( bool isChecked )
|
|||||||
QStringList fileNames = QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
QStringList fileNames = QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
|
||||||
"Import Poly Lines Annotation",
|
"Import Poly Lines Annotation",
|
||||||
defaultDir,
|
defaultDir,
|
||||||
"Text File (*.txt);Polylines (*.dat);All Files (*.*)" );
|
"Text Files (*.txt);;Polylines (*.dat);;All Files (*.*)" );
|
||||||
|
|
||||||
if ( fileNames.isEmpty() ) return;
|
if ( fileNames.isEmpty() ) return;
|
||||||
|
|
||||||
|
@ -74,6 +74,8 @@ void RicSaveEclipseInputVisibleCellsUi::defineEditorAttribute( const caf::PdmFie
|
|||||||
if ( myAttr )
|
if ( myAttr )
|
||||||
{
|
{
|
||||||
myAttr->m_selectSaveFileName = true;
|
myAttr->m_selectSaveFileName = true;
|
||||||
|
// Set GRDECL file filter as default
|
||||||
|
myAttr->m_fileSelectionFilter = "GRDECL files (*.grdecl);;All files (*.*)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,8 @@ void RimBinaryExportSettings::defineEditorAttribute( const caf::PdmFieldHandle*
|
|||||||
caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast<caf::PdmUiFilePathEditorAttribute*>( attribute );
|
caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast<caf::PdmUiFilePathEditorAttribute*>( attribute );
|
||||||
if ( myAttr )
|
if ( myAttr )
|
||||||
{
|
{
|
||||||
myAttr->m_selectSaveFileName = true;
|
myAttr->m_selectSaveFileName = true;
|
||||||
|
myAttr->m_fileSelectionFilter = "Text files (*.txt);;All files (*.*)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,8 @@ void RimExportInputSettings::defineEditorAttribute( const caf::PdmFieldHandle* f
|
|||||||
caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast<caf::PdmUiFilePathEditorAttribute*>( attribute );
|
caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast<caf::PdmUiFilePathEditorAttribute*>( attribute );
|
||||||
if ( myAttr )
|
if ( myAttr )
|
||||||
{
|
{
|
||||||
myAttr->m_selectSaveFileName = true;
|
myAttr->m_selectSaveFileName = true;
|
||||||
|
myAttr->m_fileSelectionFilter = "Text files (*.txt);;All files (*.*)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,12 +60,7 @@ public:
|
|||||||
PdmUiFilePathEditorAttribute()
|
PdmUiFilePathEditorAttribute()
|
||||||
{
|
{
|
||||||
m_selectSaveFileName = false;
|
m_selectSaveFileName = false;
|
||||||
#ifdef _WIN32
|
|
||||||
m_fileSelectionFilter = "All files (*.*)";
|
m_fileSelectionFilter = "All files (*.*)";
|
||||||
#else
|
|
||||||
m_fileSelectionFilter = "All files (*)";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_defaultPath = QString();
|
m_defaultPath = QString();
|
||||||
m_selectDirectory = false;
|
m_selectDirectory = false;
|
||||||
m_appendUiSelectedFolderToText = false;
|
m_appendUiSelectedFolderToText = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user