fix display of ARRAY fields inside of structure data types.
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 22 Apr 2016 19:49:10 +0300 (2016-04-22)
changeset 1502 62eb21aab1fb
parent 1501 d917c209529d
child 1503 3a238c0c5993
fix display of ARRAY fields inside of structure data types.

Previously ARRAY fields in structures were displayed, for example,
like 'ARRAY [1..2] OF ARRAY' instead of 'ARRAY [1..2] OF INT'. Because
of this error the array type can be really edited.
PLCControler.py
--- a/PLCControler.py	Fri Apr 22 17:02:18 2016 +0300
+++ b/PLCControler.py	Fri Apr 22 19:49:10 2016 +0300
@@ -1962,7 +1962,7 @@
                             for dimension in element_type.getdimension():
                                 dimensions.append((dimension.getlower(), dimension.getupper()))
                             base_type = element_type.baseType.getcontent()
-                            base_type_type = element_type.getLocalTag()
+                            base_type_type = base_type.getLocalTag()
                             element_infos["Type"] = ("array",
                                 base_type.getname()
                                 if base_type_type == "derived"