diff options
author | jblum | 2009-05-02 07:55:12 +0000 |
---|---|---|
committer | jblum | 2009-05-02 07:55:12 +0000 |
commit | c429b6a947f9532a4f0d3160bddb0f7af0b65e3c (patch) | |
tree | f1c6ef7b707331c75db41f5b1e10965069ae65e3 | |
parent | d580fa786256f936f43738a9f097141cb5e19a98 (diff) | |
download | gnuradio-c429b6a947f9532a4f0d3160bddb0f7af0b65e3c.tar.gz gnuradio-c429b6a947f9532a4f0d3160bddb0f7af0b65e3c.tar.bz2 gnuradio-c429b6a947f9532a4f0d3160bddb0f7af0b65e3c.zip |
Fix for custom category paths.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10946 221aa14e-8319-0410-a670-987f0aec2ac5
-rw-r--r-- | grc/src/gui/BlockTreeWindow.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/grc/src/gui/BlockTreeWindow.py b/grc/src/gui/BlockTreeWindow.py index 9e4bec3f9..ed69ef5b9 100644 --- a/grc/src/gui/BlockTreeWindow.py +++ b/grc/src/gui/BlockTreeWindow.py @@ -80,10 +80,11 @@ class BlockTreeWindow(gtk.VBox): """ Add a block with category to this selection window. Add only the category when block is None. - @param category the category list + @param category the category list or path string @param block the block object or None """ - category = tuple(category)[1:] #tuple is hashable + if isinstance(category, str): category = category.split('/') + category = tuple(filter(lambda x: x, category)) #tuple is hashable #add category and all sub categories for i, cat_name in enumerate(category): sub_category = category[:i+1] |