diff options
author | rahulp13 | 2020-12-14 21:08:43 +0530 |
---|---|---|
committer | rahulp13 | 2020-12-14 21:08:43 +0530 |
commit | 779eac4d604c082442ba9ca72a7c23509a78e5f5 (patch) | |
tree | 43831dac148767334754754988a6abc5c4352f9e /src/frontEnd/Workspace.py | |
parent | b3b25b6f1b6c5202620548cce59985d8b79a495f (diff) | |
download | eSim-779eac4d604c082442ba9ca72a7c23509a78e5f5.tar.gz eSim-779eac4d604c082442ba9ca72a7c23509a78e5f5.tar.bz2 eSim-779eac4d604c082442ba9ca72a7c23509a78e5f5.zip |
changed QFileDialog separator and handled crash exception for all input fields
Diffstat (limited to 'src/frontEnd/Workspace.py')
-rw-r--r-- | src/frontEnd/Workspace.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/frontEnd/Workspace.py b/src/frontEnd/Workspace.py index 0a80d357..4d033539 100644 --- a/src/frontEnd/Workspace.py +++ b/src/frontEnd/Workspace.py @@ -13,7 +13,7 @@ # MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in # ORGANIZATION: eSim Team at FOSSEE, IIT Bombay # CREATED: Wednesday 05 February 2015 -# REVISION: Saturday 25 July 2020 +# REVISION: Sunday 13 December 2020 # ========================================================================= from PyQt5 import QtCore, QtGui, QtWidgets @@ -172,7 +172,11 @@ class Workspace(QtWidgets.QWidget): def browseLocation(self): print("Function : Browse Location") - self.workspace_directory = QtWidgets.QFileDialog.getExistingDirectory( - self, "Browse Location", os.path.expanduser("~") + self.workspace_directory = QtCore.QDir.toNativeSeparators( + QtWidgets.QFileDialog.getExistingDirectory( + self, "Browse Location", os.path.expanduser("~") + ) ) - self.workspace_loc.setText(self.workspace_directory) + + if self.workspace_directory: + self.workspace_loc.setText(self.workspace_directory) |