Skip to content

Commit

Permalink
Added the Project select warning dialog box for all the features
Browse files Browse the repository at this point in the history
  • Loading branch information
Eyantra698Sumanto authored Sep 2, 2023
1 parent 583043e commit aa6c71e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/frontEnd/DockArea.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,18 @@ def modelEditor(self):
global count

projDir = self.obj_appconfig.current_project["ProjectName"]
if projDir is None:
""" when projDir is None that is clicking on subcircuit icon
without any project selection """
self.msg = QtWidgets.QErrorMessage()
self.msg.setModal(True)
self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
'Please select the project first.'
' You can either create new project or open existing project'
)
self.msg.exec_()
return
projName = os.path.basename(projDir)
dockName = f'Model Editor-{projName}-'

Expand Down Expand Up @@ -300,6 +312,18 @@ def makerchip(self):
global count

projDir = self.obj_appconfig.current_project["ProjectName"]
if projDir is None:
""" when projDir is None that is clicking on subcircuit icon
without any project selection """
self.msg = QtWidgets.QErrorMessage()
self.msg.setModal(True)
self.msg.setWindowTitle("Error Message")
self.msg.showMessage(
'Please select the project first.'
' You can either create new project or open existing project'
)
self.msg.exec_()
return
projName = os.path.basename(projDir)
dockName = f'Makerchip-{projName}-'

Expand Down

0 comments on commit aa6c71e

Please sign in to comment.