summaryrefslogtreecommitdiff
path: root/src/frontEnd
diff options
context:
space:
mode:
authoranjalijaiswal082019-06-27 00:13:54 +0530
committeranjalijaiswal082019-06-27 00:13:54 +0530
commit1c7c55e71124ab3291b4b8091a85c00278cb425d (patch)
treebcdb6ce11703ac3292718df1606e2b51222ff516 /src/frontEnd
parent658e04f2da8dfd0de70e03cc30249da11863dd52 (diff)
downloadeSim-1c7c55e71124ab3291b4b8091a85c00278cb425d.tar.gz
eSim-1c7c55e71124ab3291b4b8091a85c00278cb425d.tar.bz2
eSim-1c7c55e71124ab3291b4b8091a85c00278cb425d.zip
Added loop and condition
Diffstat (limited to 'src/frontEnd')
-rw-r--r--src/frontEnd/ProjectExplorer.py20
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)