--- a/ProjectController.py Tue Apr 30 00:33:09 2013 +0200
+++ b/ProjectController.py Tue Apr 30 09:49:52 2013 +0200
@@ -214,24 +214,28 @@
def SetParamsAttribute(self, path, value):
if path.startswith("BeremizRoot.TargetType.") and self.BeremizRoot.getTargetType().getcontent() is None:
self.BeremizRoot.setTargetType(self.GetTarget())
- return ConfigTreeNode.SetParamsAttribute(self, path, value)
+ res = ConfigTreeNode.SetParamsAttribute(self, path, value) + if path.startswith("BeremizRoot.Libraries."): + wx.CallAfter(self.RefreshConfNodesBlockLists) # helper func to check project path write permission
def CheckProjectPathPerm(self, dosave=True):
if CheckPathPerm(self.ProjectPath):
- dialog = wx.MessageDialog(self.AppFrame,
- _('You must have permission to work on the project\nWork on a project copy ?'),
- wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
- answer = dialog.ShowModal()
- if answer == wx.ID_YES:
- if self.SaveProjectAs():
- self.AppFrame.RefreshTitle()
- self.AppFrame.RefreshFileMenu()
- self.AppFrame.RefreshPageTitles()
+ if self.AppFrame is not None: + dialog = wx.MessageDialog(self.AppFrame, + _('You must have permission to work on the project\nWork on a project copy ?'), + wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION) + answer = dialog.ShowModal() + if answer == wx.ID_YES: + if self.SaveProjectAs(): + self.AppFrame.RefreshTitle() + self.AppFrame.RefreshFileMenu() + self.AppFrame.RefreshPageTitles() def _getProjectFilesPath(self, project_path=None):