From 9e61bdf3647f8e32c09da2805caf349f0ffddbf1 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 11 Apr 2017 18:04:50 +0300 Subject: [PATCH] Issue #2055 Import feature : the file type selector doesn't work --- src/ModuleBase/ModuleBase_WidgetFileSelector.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp b/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp index 534c7c8c4..14b5be9a1 100644 --- a/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp @@ -114,9 +114,13 @@ void ModuleBase_WidgetFileSelector::onPathSelectionBtn() ? myDefaultPath : QFileInfo(myPathField->text()).absolutePath(); QString aFilter = filterString(); + // use Option prohibited native dialog using to have both lower/upper extensions of files + // satisfied to dialog filter on Linux(Calibre) Issue #2055 QString aFileName = (myType == WFS_SAVE) - ? QFileDialog::getSaveFileName(this, myTitle, aDefaultPath, aFilter, &mySelectedFilter) - : QFileDialog::getOpenFileName(this, myTitle, aDefaultPath, aFilter, &mySelectedFilter); + ? QFileDialog::getSaveFileName(this, myTitle, aDefaultPath, aFilter, &mySelectedFilter, + QFileDialog::DontUseNativeDialog) + : QFileDialog::getOpenFileName(this, myTitle, aDefaultPath, aFilter, &mySelectedFilter, + QFileDialog::DontUseNativeDialog); if (!aFileName.isEmpty()) { if (myType == WFS_SAVE) aFileName = applyExtension(aFileName, mySelectedFilter); -- 2.39.2