Skip to content

Commit

Permalink
Merge branch 's7' of github.com:OpenClovis/SAFplus-Availability-Scala…
Browse files Browse the repository at this point in the history
…bility-Platform into s7
  • Loading branch information
honhattuyen committed Jul 7, 2021
2 parents 82da58b + 30dc6b7 commit e35afa6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/ide/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def __init__(self, parent,guiPlaces,baseClass):
self.menuProject.Enable(PROJECT_PROPERTIES, False)


self.menuProject.Bind(wx.EVT_MENU, self.OnLoadProject, id=PROJECT_OPEN)
self.menuProject.Bind(wx.EVT_MENU, self.OnLoad, id=PROJECT_OPEN)
self.menuProject.Bind(wx.EVT_MENU, self.OnCloseProject, id=PROJECT_CLOSE)
self.menuProject.Bind(wx.EVT_MENU, self.OnValidate, id=PROJECT_VALIDATE)
self.menuProject.Bind(wx.EVT_MENU, self.OnMakeImages, id=MAKE_IMAGES)
Expand Down Expand Up @@ -605,6 +605,16 @@ def onSelectContext(self, event):
frame.openFile[newPath].control.file_path = newPath
frame.openFile[newPath].control.detect_language()
elif os.path.isdir(itemPath):
prj = self.active()
if prj:
if os.path.isfile(prj.projectFilename) and itemText == (prj.projectFilename).split("/")[-2]:
fileName = self.getFileName(prj.projectFilename)
prj.projectFilename = os.path.join(newPath, fileName)
prj.fileProject = os.path.join(newPath, fileName)
if prj == self.currentActiveProject:
self.currentProjectPath = os.path.join(newPath, fileName)
XMLFileName = self.getFileName(prj._safplusModel.filename)
prj._safplusModel.filename = os.path.join(newPath, XMLFileName)
self.renameTreeRecursion(itemPath, itemPath, newPath)
os.rename(itemPath, newPath)
parentItem = self.tree.GetItemParent(selectedItem)
Expand Down

0 comments on commit e35afa6

Please sign in to comment.