]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2055 Import feature : the file type selector doesn't work
authornds <nds@opencascade.com>
Tue, 11 Apr 2017 15:04:50 +0000 (18:04 +0300)
committernds <nds@opencascade.com>
Tue, 11 Apr 2017 15:04:50 +0000 (18:04 +0300)
src/ModuleBase/ModuleBase_WidgetFileSelector.cpp

index 534c7c8c44c7925b66433eec8315d88d4f9db9c7..14b5be9a149aefde291946ab684e82df56e9ccb2 100644 (file)
@@ -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);