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/Application.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/Application.py')
-rw-r--r-- | src/frontEnd/Application.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 4edf7a9f..94bce4ae 100644 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -13,7 +13,7 @@ # MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in # ORGANIZATION: eSim Team at FOSSEE, IIT Bombay # CREATED: Tuesday 24 February 2015 -# REVISION: Saturday 01 August 2020 +# REVISION: Sunday 13 December 2020 # ========================================================================= import os @@ -293,13 +293,20 @@ class Application(QtWidgets.QMainWindow): text, ok = QtWidgets.QInputDialog.getText( self, 'New Project Info', 'Enter Project Name:' ) + updated = False + if ok: self.projname = (str(text)) self.project = NewProjectInfo() directory, filelist = self.project.createProject(self.projname) - self.obj_Mainview.obj_projectExplorer.addTreeNode( - directory, filelist) - else: + + if directory and filelist: + self.obj_Mainview.obj_projectExplorer.addTreeNode( + directory, filelist + ) + updated = True + + if not updated: print("No new project created") self.obj_appconfig.print_info('No new project created') try: @@ -714,7 +721,7 @@ class Application(QtWidgets.QMainWindow): 'Please select the project first. ' + 'You can either create a new project or open existing project' ) - self.exec_() + self.msg.exec_() def open_OMoptim(self): """ |