diff options
author | Rahul Paknikar | 2021-01-08 13:10:30 +0530 |
---|---|---|
committer | GitHub | 2021-01-08 13:10:30 +0530 |
commit | 840090d0eedac3c60026269f50f9bb8365e4801b (patch) | |
tree | d518be49a0aacfdba9d18f99da73fc9d9fa7271f /src/subcircuit/openSub.py | |
parent | a61c3edf10706ca0231b4441f84f801f0c9d4773 (diff) | |
parent | 1b5e07107e5fcf0269de20885a371b54049823e3 (diff) | |
download | eSim-840090d0eedac3c60026269f50f9bb8365e4801b.tar.gz eSim-840090d0eedac3c60026269f50f9bb8365e4801b.tar.bz2 eSim-840090d0eedac3c60026269f50f9bb8365e4801b.zip |
Merge pull request #162 from rahulp13/masterv2.1
fixed crash issues
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'] \ |