equal
deleted
inserted
replaced
392 self.PluginInfos = {} |
392 self.PluginInfos = {} |
393 |
393 |
394 if projectOpen is not None and os.path.isdir(projectOpen): |
394 if projectOpen is not None and os.path.isdir(projectOpen): |
395 self.PluginRoot = PluginsRoot(self, self.Log) |
395 self.PluginRoot = PluginsRoot(self, self.Log) |
396 self.Controler = self.PluginRoot |
396 self.Controler = self.PluginRoot |
397 self.PluginRoot.LoadProject(projectOpen, buildpath) |
397 result = self.PluginRoot.LoadProject(projectOpen, buildpath) |
398 self._Refresh(TYPESTREE, INSTANCESTREE, LIBRARYTREE) |
398 if not result: |
399 self.RefreshAll() |
399 self.DebugVariablePanel.SetDataProducer(self.PluginRoot) |
|
400 self._Refresh(TYPESTREE, INSTANCESTREE, LIBRARYTREE) |
|
401 self.RefreshAll() |
|
402 else: |
|
403 self.ResetView() |
|
404 self.ShowErrorMessage(result) |
400 else: |
405 else: |
401 self.PluginRoot = None |
406 self.PluginRoot = None |
402 self.Controler = None |
407 self.Controler = None |
403 |
408 |
404 # Add beremiz's icon in top left corner of the frame |
409 # Add beremiz's icon in top left corner of the frame |
1296 if not result: |
1301 if not result: |
1297 self.DebugVariablePanel.SetDataProducer(self.PluginRoot) |
1302 self.DebugVariablePanel.SetDataProducer(self.PluginRoot) |
1298 self._Refresh(TYPESTREE, INSTANCESTREE, LIBRARYTREE) |
1303 self._Refresh(TYPESTREE, INSTANCESTREE, LIBRARYTREE) |
1299 self.RefreshAll() |
1304 self.RefreshAll() |
1300 else: |
1305 else: |
|
1306 self.ResetView() |
1301 self.ShowErrorMessage(result) |
1307 self.ShowErrorMessage(result) |
1302 self._Refresh(TITLE, TOOLBAR, FILEMENU, EDITMENU) |
1308 self._Refresh(TITLE, TOOLBAR, FILEMENU, EDITMENU) |
1303 event.Skip() |
1309 event.Skip() |
1304 |
1310 |
1305 def OnOpenProjectMenu(self, event): |
1311 def OnOpenProjectMenu(self, event): |
1321 if not result: |
1327 if not result: |
1322 self.DebugVariablePanel.SetDataProducer(self.PluginRoot) |
1328 self.DebugVariablePanel.SetDataProducer(self.PluginRoot) |
1323 self._Refresh(TYPESTREE, INSTANCESTREE, LIBRARYTREE) |
1329 self._Refresh(TYPESTREE, INSTANCESTREE, LIBRARYTREE) |
1324 self.RefreshAll() |
1330 self.RefreshAll() |
1325 else: |
1331 else: |
|
1332 self.ResetView() |
1326 self.ShowErrorMessage(result) |
1333 self.ShowErrorMessage(result) |
1327 else: |
1334 else: |
1328 self.ShowErrorMessage(_("\"%s\" folder is not a valid Beremiz project\n") % projectpath) |
1335 self.ShowErrorMessage(_("\"%s\" folder is not a valid Beremiz project\n") % projectpath) |
1329 self._Refresh(TITLE, TOOLBAR, FILEMENU, EDITMENU) |
1336 self._Refresh(TITLE, TOOLBAR, FILEMENU, EDITMENU) |
1330 dialog.Destroy() |
1337 dialog.Destroy() |