>> Pay a particular attention to the fact plugins can be *now* updated (when >> the source file has >> changed), and therefore menus can also be updated. >> the "PCB_EDIT_FRAME::createActionPluginMenus()" method calls Connect, but >> Disconnect is never called >> by destructors. >> It can create issues when updating scripts, because it could be called more >> than once. > > If you need to update the menus when a script file changes, you would > have to connect a wxFileWatcherEvent to the appropriate wxMainFrame > object to monitor the loaded script file and update the menus > accordingly. It can be done but I would proceed with caution here. > Is it really necessary to add a file watcher ? Once python plugins are loaded, python subsystem run the plugin as it was at start time (As I understand). I had perform a little test for that. If you modify a plugin while pcbnew is running, this is always the "old" version that is running. Not sure that is true for all OS... So menu are not supposed to change even if file change. An other point: if I implement that file watching, I should also implement a "directory watcher". In case a new plugins is installed during pcbnew is running ;) Perhaps an "update button": like onUpdatePythonModulesClick for footprint plugins ?
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

