controls/SearchResultPanel.py
changeset 899 64aa66d481c5
parent 814 5743cbdff669
child 1556 32e9d0ef30dc
equal deleted inserted replaced
898:6b2958f04f30 899:64aa66d481c5
   228                     for _element_infos in search_results_tree_children:
   228                     for _element_infos in search_results_tree_children:
   229                         if _element_infos["name"] == words[1]:
   229                         if _element_infos["name"] == words[1]:
   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:
       
   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                 
   233                 else:
   248                 else:
   234                     search_results_tree_children.append(element_infos)
   249                     search_results_tree_children.append(element_infos)
   235             
   250             
   236             if matches_number < 2:
   251             if matches_number < 2:
   237                 header_format = _("'%s' - %d match in project")
   252                 header_format = _("'%s' - %d match in project")