# HG changeset patch # User Laurent Bessard # Date 1370466592 -7200 # Node ID 775b48a2be3b0338f4bc9f694d68aa42bd44a691 # Parent d18ccec78117d1a1a2a3d60818db815acf30d3b1 Fixed flickering and lag when refreshing PouInstanceVariablesPanel diff -r d18ccec78117 -r 775b48a2be3b IDEFrame.py --- a/IDEFrame.py Wed Jun 05 23:06:01 2013 +0200 +++ b/IDEFrame.py Wed Jun 05 23:09:52 2013 +0200 @@ -1358,7 +1358,6 @@ tagname = window.GetTagName() if not window.IsDebugging(): self.SelectProjectTreeItem(tagname) - self.PouInstanceVariablesPanel.SetPouType(tagname) window.RefreshView() self.EnsureTabVisible(self.LibraryPanel) else: diff -r d18ccec78117 -r 775b48a2be3b PLCControler.py --- a/PLCControler.py Wed Jun 05 23:06:01 2013 +0200 +++ b/PLCControler.py Wed Jun 05 23:09:52 2013 +0200 @@ -561,7 +561,7 @@ instances.append(var_path) else: pou = project.getpou(var_type) - if pou is not None: + if pou is not None and project.ElementIsUsedBy(pou_type, var_type): instances.extend( self.RecursiveSearchPouInstances( project, pou_type, var_path, @@ -596,7 +596,7 @@ if pou_type == words[1]: instances.append(pou_path) pou = project.getpou(pou_type) - if pou is not None: + if pou is not None and project.ElementIsUsedBy(words[1], pou_type): instances.extend( self.RecursiveSearchPouInstances( project, words[1], pou_path, diff -r d18ccec78117 -r 775b48a2be3b controls/PouInstanceVariablesPanel.py --- a/controls/PouInstanceVariablesPanel.py Wed Jun 05 23:06:01 2013 +0200 +++ b/controls/PouInstanceVariablesPanel.py Wed Jun 05 23:09:52 2013 +0200 @@ -113,7 +113,7 @@ self.RefreshView() def SetPouType(self, tagname, pou_instance=None): - if self.Controller is not None: + if self.Controller is not None: self.PouTagName = tagname if self.PouTagName == "Project": config_name = self.Controller.GetProjectMainConfigurationName() @@ -134,6 +134,7 @@ self.RefreshView() def RefreshView(self): + self.Freeze() self.VariablesList.DeleteAllItems() self.InstanceChoice.Clear() self.InstanceChoice.SetValue("") @@ -212,6 +213,8 @@ self.RefreshButtons() + self.Thaw() + def RefreshButtons(self): enabled = self.InstanceChoice.GetSelection() != -1 self.ParentButton.Enable(enabled and self.PouInfos["class"] != ITEM_CONFIGURATION)