Adding support for refreshing FileMenu after plugin tree modification
authorlaurent
Fri, 11 Dec 2009 13:02:30 +0100
changeset 505 7f38c773427b
parent 504 688e84df3408
child 506 24629d4fc805
Adding support for refreshing FileMenu after plugin tree modification
Beremiz.py
--- a/Beremiz.py	Fri Dec 11 08:49:32 2009 +0100
+++ b/Beremiz.py	Fri Dec 11 13:02:30 2009 +0100
@@ -732,6 +732,7 @@
             for i in items:
                 self.PluginInfos[plugin][i].SetBackgroundColour(bkgdclr)
                 self.PluginInfos[plugin][i].Refresh()
+        self.RefreshFileMenu()
         return res
 
     def ExpandPlugin(self, plugin, force = False):
@@ -1446,8 +1447,9 @@
             if dialog.ShowModal() == wx.ID_OK:
                 PluginName = dialog.GetValue()
                 plugin.PlugAddChild(PluginName, PluginType)
+                self.PluginRoot.RefreshPluginsBlockLists()
+                self.RefreshFileMenu()
                 self.RefreshPluginTree()
-                self.PluginRoot.RefreshPluginsBlockLists()
             dialog.Destroy()
     
     def DeletePlugin(self, plugin):
@@ -1458,6 +1460,7 @@
                 plugin.PlugRemove()
                 del plugin
                 self.PluginRoot.RefreshPluginsBlockLists()
+                self.RefreshFileMenu()
                 self.RefreshPluginTree()
             dialog.Destroy()