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/ngspicetoModelica/ModelicaUI.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/ngspicetoModelica/ModelicaUI.py')
-rw-r--r-- | src/ngspicetoModelica/ModelicaUI.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ngspicetoModelica/ModelicaUI.py b/src/ngspicetoModelica/ModelicaUI.py index 8e2479c9..6cd736b7 100644 --- a/src/ngspicetoModelica/ModelicaUI.py +++ b/src/ngspicetoModelica/ModelicaUI.py @@ -45,9 +45,15 @@ class OpenModelicaEditor(QtWidgets.QWidget): self.show() def browseFile(self): - self.ngspiceNetlist = QtWidgets.QFileDialog.getOpenFileName( - self, 'Open Ngspice Netlist', BROWSE_LOCATION)[0] - self.FileEdit.setText(self.ngspiceNetlist) + temp = QtCore.QDir.toNativeSeparators( + QtWidgets.QFileDialog.getOpenFileName( + self, 'Open Ngspice Netlist', BROWSE_LOCATION + )[0] + ) + + if temp: + self.ngspiceNetlist = temp + self.FileEdit.setText(self.ngspiceNetlist) def callConverter(self): |