--- a/PLCControler.py Thu Sep 13 09:46:51 2007 +0200
+++ b/PLCControler.py Mon Sep 17 10:13:56 2007 +0200
@@ -864,7 +864,7 @@
if isinstance(instance, plcopen.comment):
block_infos["comment"] = instance.getContentText()
BlockTypes[-1]["list"].append(block_infos)
-
+
# Return Block types checking for recursion
def GetBlockTypes(self):
if self.CurrentElementEditing != None:
@@ -881,7 +881,7 @@
type = None
if type == "function":
blocktypes = []
- for category in BlockTypes[:-1]:
+ for category in BlockTypes[:-1] + PluginTypes:
cat = {"name" : category["name"], "list" : []}
for block in category["list"]:
if block["type"] == "function":
@@ -889,7 +889,7 @@
if len(cat["list"]) > 0:
blocktypes.append(cat)
else:
- blocktypes = [category for category in BlockTypes[:-1]]
+ blocktypes = [category for category in BlockTypes[:-1] + PluginTypes]
if self.Project:
blocktypes.append({"name" : "User-defined POUs", "list": []})
for blocktype in BlockTypes[-1]["list"]:
@@ -925,7 +925,6 @@
return blocktypes
return []
-
# Return Block types checking for recursion
def GetBlockResource(self):
blocktypes = []