# HG changeset patch # User laurent # Date 1337619016 -7200 # Node ID e00ce7077bfc67b99311fcd679d53993bba526ac # Parent 361389f3ad2b9c172af74cc4c717b94da9014e6a Fix bugs on PouInstanceVariablesPanel diff -r 361389f3ad2b -r e00ce7077bfc PLCControler.py --- a/PLCControler.py Mon May 21 18:49:49 2012 +0200 +++ b/PLCControler.py Mon May 21 18:50:16 2012 +0200 @@ -397,7 +397,8 @@ edit = debug = pou_type is not None if pou_type is None: block_infos = self.GetBlockType(var_type, debug = debug) - pou_type = block_infos["type"] + if block_infos is None: + pou_type = block_infos["type"] if pou_type is not None: var_class = None if pou_type == "program": diff -r 361389f3ad2b -r e00ce7077bfc controls/PouInstanceVariablesPanel.py --- a/controls/PouInstanceVariablesPanel.py Mon May 21 18:49:49 2012 +0200 +++ b/controls/PouInstanceVariablesPanel.py Mon May 21 18:50:16 2012 +0200 @@ -179,6 +179,8 @@ for button in buttons: panel_sizer.AddWindow(button, 0, border=4, flag=wx.LEFT) + panel_sizer.Layout() + else: panel.Destroy() panel = None