summaryrefslogtreecommitdiff
path: root/src/ngspicetoModelica
diff options
context:
space:
mode:
Diffstat (limited to 'src/ngspicetoModelica')
-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):