--- a/IDEFrame.py Mon Dec 04 19:35:31 2017 +0300
+++ b/IDEFrame.py Tue Dec 05 12:38:04 2017 +0300
@@ -1514,12 +1514,13 @@
tagname = None
# Refresh treectrl items according to project infos
- infos = self.Controler.GetProjectInfos()
- root = self.ProjectTree.GetRootItem()
- if root is None or not root.IsOk():
- root = self.ProjectTree.AddRoot(infos["name"])
- self.GenerateProjectTreeBranch(root, infos)
- self.ProjectTree.Expand(root)
+ if self.Controler:
+ infos = self.Controler.GetProjectInfos()
+ root = self.ProjectTree.GetRootItem()
+ if root is None or not root.IsOk():
+ root = self.ProjectTree.AddRoot(infos["name"])
+ self.GenerateProjectTreeBranch(root, infos)
+ self.ProjectTree.Expand(root)
# Select new item corresponding to previous selected item
if tagname is not None:
--- a/controls/SearchResultPanel.py Mon Dec 04 19:35:31 2017 +0300
+++ b/controls/SearchResultPanel.py Tue Dec 05 12:38:04 2017 +0300
@@ -175,6 +175,9 @@
def RefreshView(self):
self.SearchResultsTree.DeleteAllItems()
if self.Criteria is None:
+ self.SearchResultsTree.AddRoot("")
+ root = self.SearchResultsTree.GetRootItem()
+ root.SetHilight(False)
self.HeaderLabel.SetLabel(_("No search results available."))
self.ResetButton.Enable(False)
else: