summaryrefslogtreecommitdiff
path: root/src/frontEnd
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontEnd')
-rw-r--r--src/frontEnd/Application.py9
-rwxr-xr-xsrc/frontEnd/ProjectExplorer.py30
2 files changed, 22 insertions, 17 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index d3ef020f..7588b1a1 100644
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -10,11 +10,11 @@
# BUGS: ---
# NOTES: ---
# AUTHOR: Fahim Khan, fahim.elex@gmail.com
-# MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in
+# MAINTAINED: Rahul Paknikar, rahulp@cse.iitb.ac.in
# Sumanto Kar, sumantokar@iitb.ac.in
# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay
# CREATED: Tuesday 24 February 2015
-# REVISION: Monday 31 January 2022
+# REVISION: Tuesday 13 September 2022
# =========================================================================
import os
@@ -949,4 +949,7 @@ def main(args):
# Call main function
if __name__ == '__main__':
# Create and display the splash screen
- main(sys.argv)
+ try:
+ main(sys.argv)
+ except Exception as err:
+ print("Error: ", err)
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py
index bacb569c..77c9352e 100755
--- a/src/frontEnd/ProjectExplorer.py
+++ b/src/frontEnd/ProjectExplorer.py
@@ -132,25 +132,21 @@ class ProjectExplorer(QtWidgets.QWidget):
self.filePath = str(
self.indexItem.sibling(self.indexItem.row(), 1).data()
)
- self.obj_appconfig.print_info(
- 'The current project is ' + self.filePath)
-
- self.textwindow = QtWidgets.QWidget()
- self.textwindow.setMinimumSize(600, 500)
- self.textwindow.setGeometry(QtCore.QRect(400, 150, 400, 400))
- self.textwindow.setWindowTitle(filename)
-
- self.text = QtWidgets.QTextEdit()
- self.save = QtWidgets.QPushButton('Save and Exit')
- self.save.setDisabled(True)
- self.windowgrid = QtWidgets.QGridLayout()
- self.refreshProject(self.filePath)
if (os.path.isfile(str(self.filePath))):
self.fopen = open(str(self.filePath), 'r')
lines = self.fopen.read()
- self.text.setText(lines)
+ self.textwindow = QtWidgets.QWidget()
+ self.textwindow.setMinimumSize(600, 500)
+ self.textwindow.setGeometry(QtCore.QRect(400, 150, 400, 400))
+ self.textwindow.setWindowTitle(filename)
+
+ self.text = QtWidgets.QTextEdit()
+ self.save = QtWidgets.QPushButton('Save and Exit')
+ self.save.setDisabled(True)
+
+ self.text.setText(lines)
self.text.textChanged.connect(self.enable_save)
vbox_main = QtWidgets.QVBoxLayout(self.textwindow)
@@ -160,6 +156,12 @@ class ProjectExplorer(QtWidgets.QWidget):
self.textwindow.show()
else:
+ self.refreshProject(self.filePath)
+
+ self.obj_appconfig.print_info(
+ 'The current project is: ' + self.filePath
+ )
+
self.obj_appconfig.current_project["ProjectName"] = str(
self.filePath)
(