Fixed bug when searching in LibraryPanel on Windows
authorLaurent Bessard
Thu, 06 Jun 2013 23:48:25 +0200
changeset 1235 1a30c70fa025
parent 1234 9623d591efb9
child 1236 a5d1d2a2f366
Fixed bug when searching in LibraryPanel on Windows
controls/LibraryPanel.py
--- a/controls/LibraryPanel.py	Thu Jun 06 23:45:39 2013 +0200
+++ b/controls/LibraryPanel.py	Thu Jun 06 23:48:25 2013 +0200
@@ -417,7 +417,10 @@
                 if name.upper().find(value.upper()) != -1 and item != selected:
                     # Select block and collapse all categories other than block
                     # category
-                    self.Tree.CollapseAllChildren(root)
+                    child, child_cookie = self.Tree.GetFirstChild(root)
+                    while child.IsOk():
+                        self.Tree.CollapseAllChildren(child)
+                        child, child_cookie = self.Tree.GetNextChild(root, child_cookie)
                     self.Tree.SelectItem(item)
                     self.Tree.EnsureVisible(item)
                     return True