From 56fe2d8da0040c16863bd337a59dde98c6b76d95 Mon Sep 17 00:00:00 2001 From: kbwbe Date: Mon, 29 Apr 2019 20:04:54 +0200 Subject: [PATCH] force non native filedialog because of Ubuntu 18.04LTS --- InitGui.py | 2 +- a2p_importpart.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/InitGui.py b/InitGui.py index 433c5eeb..cc3ea326 100644 --- a/InitGui.py +++ b/InitGui.py @@ -26,7 +26,7 @@ __title__ = 'A2plus assembly Workbench - InitGui file' __author__ = 'kbwbe' -A2P_VERSION = 'V0.4.17' +A2P_VERSION = 'V0.4.18' diff --git a/a2p_importpart.py b/a2p_importpart.py index a1eb445e..4cc6ef16 100644 --- a/a2p_importpart.py +++ b/a2p_importpart.py @@ -311,8 +311,10 @@ def Activated(self): QtGui.QApplication.activeWindow(), "Select FreeCAD document to import part from" ) - #dialog.setNameFilter("Supported Formats (*.FCStd);;STEP files (*.stp *.step);;All files (*.*)") - dialog.setNameFilter("Supported Formats (*.FCStd *.stp *.step)") #;;All files (*.*)") + # set option "DontUseNativeDialog"=True, as native Filedialog shows + # misbehavior on Unbuntu 18.04 LTS. It works case sensitively, what is not wanted... + dialog.setOption(QtGui.QFileDialog.DontUseNativeDialog, True) + dialog.setNameFilter("Supported Formats (*.FCStd *.stp *.step);;All files (*.*)") if dialog.exec_(): if PYVERSION < 3: filename = unicode(dialog.selectedFiles()[0])