controls/SearchResultPanel.py
changeset 1621 4485e6478b91
parent 1581 2295fdc5c271
child 1622 a0c7a6cb1690
equal deleted inserted replaced
1620:3bffe3bd8d78 1621:4485e6478b91
   230                             _element_infos["matches"] += len(children)
   230                             _element_infos["matches"] += len(children)
   231                             _element_infos["children"].append(element_infos)
   231                             _element_infos["children"].append(element_infos)
   232                             break
   232                             break
   233                     if element_type == ITEM_RESOURCE:
   233                     if element_type == ITEM_RESOURCE:
   234                         search_results_tree_children.append(element_infos)
   234                         search_results_tree_children.append(element_infos)
   235                     else:
       
   236                         _tagname = self.ParentWindow.Controler.ComputePouName(words[1])
       
   237                         _element_type = self.ParentWindow.Controler.GetPouType(words[1])
       
   238                     
       
   239                         _element_infos = {"name": words[1],
       
   240                                           "type": _element_type,
       
   241                                           "data": _tagname,
       
   242                                           "text": None,
       
   243                                           "matches": 1,
       
   244                                           "children": [element_infos]}
       
   245                     
       
   246                         search_results_tree_children.append(_element_infos)
       
   247                 
       
   248                 else:
   235                 else:
   249                     search_results_tree_children.append(element_infos)
   236                     search_results_tree_children.append(element_infos)
   250             
   237             
   251             if matches_number < 2:
   238             if matches_number < 2:
   252                 header_format = _("'{a1}' - {a2} match in project")
   239                 header_format = _("'{a1}' - {a2} match in project")