Skip to content
Snippets Groups Projects
Commit 45c8eec2 authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH: use the role to define the QDialog mode if the filenameParameter

parent 69c99ff7
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,20 @@ void QtWidgetFilenameParameter::SelectFile()
{
QFileDialog fileDialog;
fileDialog.setConfirmOverwrite(true);
fileDialog.setFileMode(QFileDialog::ExistingFile);
switch(m_FilenameParam->GetRole())
{
case Role_Input:
{
fileDialog.setFileMode(QFileDialog::ExistingFile);
}
break;
case Role_Output:
{
fileDialog.setFileMode(QFileDialog::AnyFile);
}
break;
}
fileDialog.setNameFilter("File (*)");
if (fileDialog.exec())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment