diff options
author | anjalijaiswal08 | 2019-06-27 00:13:54 +0530 |
---|---|---|
committer | anjalijaiswal08 | 2019-06-27 00:13:54 +0530 |
commit | 1c7c55e71124ab3291b4b8091a85c00278cb425d (patch) | |
tree | bcdb6ce11703ac3292718df1606e2b51222ff516 /src/frontEnd/ProjectExplorer.py | |
parent | 658e04f2da8dfd0de70e03cc30249da11863dd52 (diff) | |
download | eSim-1c7c55e71124ab3291b4b8091a85c00278cb425d.tar.gz eSim-1c7c55e71124ab3291b4b8091a85c00278cb425d.tar.bz2 eSim-1c7c55e71124ab3291b4b8091a85c00278cb425d.zip |
Added loop and condition
Diffstat (limited to 'src/frontEnd/ProjectExplorer.py')
-rw-r--r-- | src/frontEnd/ProjectExplorer.py | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/frontEnd/ProjectExplorer.py b/src/frontEnd/ProjectExplorer.py index 1273a545..8f2c29b5 100644 --- a/src/frontEnd/ProjectExplorer.py +++ b/src/frontEnd/ProjectExplorer.py @@ -248,9 +248,20 @@ class ProjectExplorer(QtGui.QWidget): print(newBaseFileName) print("=================") newBaseFileName = str(newBaseFileName) - projectPath, projectFiles = list( - self.obj_appconfig.project_explorer.items())[ - self.indexItem.row()] + i = 0 + print(self.indexItem.row()) + print("=================") + + for parents, children in list( + self.obj_appconfig.project_explorer.items()): + print(parents) + print("-------------------") + if os.path.exists(parents): + i += 1 + if i == self.indexItem.row(): + projectPath, projectFiles = list( + self.obj_appconfig.project_explorer.items())[i] + updatedProjectFiles = [] self.workspace = self.obj_appconfig.default_workspace['workspace'] @@ -273,7 +284,6 @@ class ProjectExplorer(QtGui.QWidget): else: reply = self.obj_validation.validateNewproj(str(projDir)) - print(reply) print("==================") # rename files matching project name @@ -283,7 +293,7 @@ class ProjectExplorer(QtGui.QWidget): oldFilePath = os.path.join(projectPath, projectFile) projectFile = projectFile.replace( - self.baseFileNam, newBaseFileName, 1) + self.baseFileName, newBaseFileName, 1) newFilePath = os.path.join( projectPath, projectFile) print(oldFilePath) |