SearchResultPanel.py
changeset 753 8a70e85f7e12
parent 714 131ea7f237b9
equal deleted inserted replaced
752:6b63246474ff 753:8a70e85f7e12
   193                                  "text": None,
   193                                  "text": None,
   194                                  "matches": len(results)}
   194                                  "matches": len(results)}
   195                 
   195                 
   196                 children = element_infos.setdefault("children", [])
   196                 children = element_infos.setdefault("children", [])
   197                 for infos, start, end, text in results:
   197                 for infos, start, end, text in results:
   198                     if element_type == ITEM_DATATYPE:
   198                     if infos[1] == "name" or element_type == ITEM_DATATYPE:
   199                         child_name = GenerateName(infos[1:])
   199                         child_name = GenerateName(infos[1:])
   200                         child_type = element_type
   200                         child_type = element_type
   201                     else:
   201                     else:
   202                         if element_type == ITEM_RESOURCE:
   202                         if element_type == ITEM_RESOURCE:
   203                             child_type = element_type
   203                             child_type = element_type
   204                         else:
   204                         else:
   205                             child_type = infos[1]
   205                             child_type = infos[1]
   206                         if child_type == "body":
   206                         if child_type == "name":
       
   207                             child_name = "name"
       
   208                         elif child_type == "body":
   207                             child_name = "body"
   209                             child_name = "body"
   208                             if element_type == ITEM_TRANSITION:
   210                             if element_type == ITEM_TRANSITION:
   209                                 child_type = self.ParentWindow.Controler.GetTransitionBodyType(words[1], words[2])
   211                                 child_type = self.ParentWindow.Controler.GetTransitionBodyType(words[1], words[2])
   210                             elif element_type == ITEM_ACTION:
   212                             elif element_type == ITEM_ACTION:
   211                                 child_type = self.ParentWindow.Controler.GetActionBodyType(words[1], words[2])
   213                                 child_type = self.ParentWindow.Controler.GetActionBodyType(words[1], words[2])