Fixed time consuming function when loading VariablePanel
authorLaurent Bessard
Tue, 24 Sep 2013 12:42:34 +0200
changeset 1325 76e52d5fcffd
parent 1324 884477877e53
child 1326 e2c11668addf
Fixed time consuming function when loading VariablePanel
controls/VariablePanel.py
--- a/controls/VariablePanel.py	Tue Sep 24 12:40:36 2013 +0200
+++ b/controls/VariablePanel.py	Tue Sep 24 12:42:34 2013 +0200
@@ -618,7 +618,7 @@
         if poutype != "function" and bodytype in ["ST", "IL"]:
             return False
         else:
-            return name in self.Controler.GetFunctionBlockTypes(self.TagName)
+            return self.Controler.GetBlockType(name, debug=self.Debug) is not None
     
     def RefreshView(self):
         self.PouNames = self.Controler.GetProjectPouNames(self.Debug)
@@ -635,7 +635,7 @@
                 self.ReturnType.Clear()
                 for data_type in self.Controler.GetDataTypes(self.TagName, debug=self.Debug):
                     self.ReturnType.Append(data_type)
-                returnType, (var_tree, dimensions) = self.Controler.GetEditedElementInterfaceReturnType(self.TagName)
+                returnType, (var_tree, dimensions) = self.Controler.GetEditedElementInterfaceReturnType(self.TagName, self.Debug)
             description = self.Controler.GetPouDescription(words[1])
             self.Values = self.Controler.GetEditedElementInterfaceVars(self.TagName, self.Debug)