NativeLib.py
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 22 Apr 2016 17:02:18 +0300
changeset 1501 d917c209529d
parent 944 52a17be9c4d1
child 1511 91538d0c242c
permissions -rw-r--r--
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.
import os
from POULibrary import POULibrary

class NativeLibrary(POULibrary):
    def GetLibraryPath(self):
        return os.path.join(os.path.split(__file__)[0], "NativeLib.xml")