--- a/Beremiz.py Fri Oct 05 17:51:55 2007 +0200
+++ b/Beremiz.py Fri Oct 05 17:55:49 2007 +0200
@@ -260,6 +260,7 @@
self.SetClientSize(wx.Size(1000, 600))
self.SetMenuBar(self.menuBar1)
+ self.Bind(wx.EVT_ACTIVATE, self.OnFrameActivated) self.MainSplitter = wx.SplitterWindow(id=ID_BEREMIZMAINSPLITTER,
name='MainSplitter', parent=self, point=wx.Point(0, 0),
@@ -332,7 +333,11 @@
self.RefreshPluginParams()
+ def OnFrameActivated(self, event): + if not event.GetActive(): + self.PluginRoot.RefreshPluginsBlockLists() def RefreshButtons(self):
if self.PluginRoot.HasProjectOpened():
self.PluginChilds.Enable(True)
@@ -493,6 +498,7 @@
button.Bind(wx.EVT_BUTTON, self.GetButtonCallBackFunction(plugin, method), id=id)
boxsizer.AddWindow(button, 0, border=5, flag=wx.GROW|wx.RIGHT)
self.ParamsPanelMainSizer.Layout()
+ self.ParamsPanel.SetClientSize(self.ParamsPanel.GetClientSize()) self.PluginChilds.Clear()
@@ -575,10 +581,7 @@
def RefreshSizerElement(self, sizer, elements, path, clean = True):
- if wx.VERSION >= (2, 7, 0):
for element_infos in elements:
--- a/plugger.py Fri Oct 05 17:51:55 2007 +0200
+++ b/plugger.py Fri Oct 05 17:55:49 2007 +0200
@@ -665,10 +665,13 @@
# Update PLCOpenEditor Plugin Block types from loaded plugins
def RefreshPluginsBlockLists(self):
- AddPluginBlockList(self.BlockTypesFactory())
- for child in self.IterChilds():
- AddPluginBlockList(child.BlockTypesFactory())
+ if getattr(self, "PluggedChilds", None) is not None: + AddPluginBlockList(self.BlockTypesFactory()) + for child in self.IterChilds(): + AddPluginBlockList(child.BlockTypesFactory()) + if self.PLCEditor is not None: + self.PLCEditor.RefreshEditor() def PlugPath(self, PlugName=None):
@@ -871,7 +874,7 @@
def _EditPLC(self, logger):
+ if self.PLCEditor is None: self.RefreshPluginsBlockLists()