diff options
Diffstat (limited to 'src/subcircuit/openSub.py')
-rw-r--r-- | src/subcircuit/openSub.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/subcircuit/openSub.py b/src/subcircuit/openSub.py index 63597661..f98fe69f 100644 --- a/src/subcircuit/openSub.py +++ b/src/subcircuit/openSub.py @@ -1,7 +1,7 @@ -from PyQt5 import QtWidgets +import os +from PyQt5 import QtWidgets, QtCore from configuration.Appconfig import Appconfig from projManagement.Worker import WorkerThread -import os # This class is called when User clicks on Edit Subcircuit Button. @@ -21,8 +21,12 @@ class openSub(QtWidgets.QWidget): if os.name == 'nt': init_path = '' - self.editfile = QtWidgets.QFileDialog.getExistingDirectory( - None, "Open File", init_path + "library/SubcircuitLibrary") + self.editfile = QtCore.QDir.toNativeSeparators( + QtWidgets.QFileDialog.getExistingDirectory( + None, "Open File", init_path + "library/SubcircuitLibrary" + ) + ) + if self.editfile: self.obj_Appconfig = Appconfig() self.obj_Appconfig.current_subcircuit['SubcircuitName'] \ |