212 return params |
212 return params |
213 |
213 |
214 def SetParamsAttribute(self, path, value): |
214 def SetParamsAttribute(self, path, value): |
215 if path.startswith("BeremizRoot.TargetType.") and self.BeremizRoot.getTargetType().getcontent() is None: |
215 if path.startswith("BeremizRoot.TargetType.") and self.BeremizRoot.getTargetType().getcontent() is None: |
216 self.BeremizRoot.setTargetType(self.GetTarget()) |
216 self.BeremizRoot.setTargetType(self.GetTarget()) |
217 return ConfigTreeNode.SetParamsAttribute(self, path, value) |
217 res = ConfigTreeNode.SetParamsAttribute(self, path, value) |
|
218 if path.startswith("BeremizRoot.Libraries."): |
|
219 wx.CallAfter(self.RefreshConfNodesBlockLists) |
|
220 return res |
218 |
221 |
219 # helper func to check project path write permission |
222 # helper func to check project path write permission |
220 def CheckProjectPathPerm(self, dosave=True): |
223 def CheckProjectPathPerm(self, dosave=True): |
221 if CheckPathPerm(self.ProjectPath): |
224 if CheckPathPerm(self.ProjectPath): |
222 return True |
225 return True |
223 dialog = wx.MessageDialog(self.AppFrame, |
226 if self.AppFrame is not None: |
224 _('You must have permission to work on the project\nWork on a project copy ?'), |
227 dialog = wx.MessageDialog(self.AppFrame, |
225 _('Error'), |
228 _('You must have permission to work on the project\nWork on a project copy ?'), |
226 wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION) |
229 _('Error'), |
227 answer = dialog.ShowModal() |
230 wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION) |
228 dialog.Destroy() |
231 answer = dialog.ShowModal() |
229 if answer == wx.ID_YES: |
232 dialog.Destroy() |
230 if self.SaveProjectAs(): |
233 if answer == wx.ID_YES: |
231 self.AppFrame.RefreshTitle() |
234 if self.SaveProjectAs(): |
232 self.AppFrame.RefreshFileMenu() |
235 self.AppFrame.RefreshTitle() |
233 self.AppFrame.RefreshPageTitles() |
236 self.AppFrame.RefreshFileMenu() |
234 return True |
237 self.AppFrame.RefreshPageTitles() |
|
238 return True |
235 return False |
239 return False |
236 |
240 |
237 def _getProjectFilesPath(self, project_path=None): |
241 def _getProjectFilesPath(self, project_path=None): |
238 if project_path is not None: |
242 if project_path is not None: |
239 return os.path.join(project_path, "project_files") |
243 return os.path.join(project_path, "project_files") |