# HG changeset patch # User Andrey Skvortsov # Date 1461333738 -10800 # Node ID d917c209529d9762f7223b78d6d9e66af3e14b76 # Parent 007588fb65493a07e131dda4d41e58ea1d9206c8 fix Traceback if search icon on library panel is clicked, when no category/item is selected in the library. The problem is here, that if nothing is selected method GetSelection() returns root item, that doesn't have any python data associated with it. This issue seems to be wx3.0 specified, because it doesn't exist with wx2.8 on Windows. diff -r 007588fb6549 -r d917c209529d controls/LibraryPanel.py --- a/controls/LibraryPanel.py Fri Apr 22 16:59:47 2016 +0300 +++ b/controls/LibraryPanel.py Fri Apr 22 17:02:18 2016 +0300 @@ -397,7 +397,7 @@ item_pydata = self.Tree.GetPyData(item) # Item is a block category - if item_pydata["type"] == CATEGORY: + if (item == root) or item_pydata["type"] == CATEGORY: # Get category first or last child according to search mode # defined