summaryrefslogtreecommitdiff
path: root/src/ngspicetoModelica/ModelicaUI.py
diff options
context:
space:
mode:
authorRahul Paknikar2021-01-08 13:10:30 +0530
committerGitHub2021-01-08 13:10:30 +0530
commit840090d0eedac3c60026269f50f9bb8365e4801b (patch)
treed518be49a0aacfdba9d18f99da73fc9d9fa7271f /src/ngspicetoModelica/ModelicaUI.py
parenta61c3edf10706ca0231b4441f84f801f0c9d4773 (diff)
parent1b5e07107e5fcf0269de20885a371b54049823e3 (diff)
downloadeSim-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.py12
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):