# HG changeset patch # User Laurent Bessard # Date 1346274124 -7200 # Node ID 8a70e85f7e12d69ca9fd30aa7a1439180fb5237c # Parent 6b63246474ff94aac7e41b60cf393028d85a4eed Fix bug in SearchResultPanel when search result is the name of a project POU diff -r 6b63246474ff -r 8a70e85f7e12 SearchResultPanel.py --- a/SearchResultPanel.py Mon Aug 27 23:09:48 2012 +0200 +++ b/SearchResultPanel.py Wed Aug 29 23:02:04 2012 +0200 @@ -195,7 +195,7 @@ children = element_infos.setdefault("children", []) for infos, start, end, text in results: - if element_type == ITEM_DATATYPE: + if infos[1] == "name" or element_type == ITEM_DATATYPE: child_name = GenerateName(infos[1:]) child_type = element_type else: @@ -203,7 +203,9 @@ child_type = element_type else: child_type = infos[1] - if child_type == "body": + if child_type == "name": + child_name = "name" + elif child_type == "body": child_name = "body" if element_type == ITEM_TRANSITION: child_type = self.ParentWindow.Controler.GetTransitionBodyType(words[1], words[2])