commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10946 - gnuradio/trunk/grc/src/gui


From: jblum
Subject: [Commit-gnuradio] r10946 - gnuradio/trunk/grc/src/gui
Date: Sat, 2 May 2009 01:55:13 -0600 (MDT)

Author: jblum
Date: 2009-05-02 01:55:12 -0600 (Sat, 02 May 2009)
New Revision: 10946

Modified:
   gnuradio/trunk/grc/src/gui/BlockTreeWindow.py
Log:
Fix for custom category paths.



Modified: gnuradio/trunk/grc/src/gui/BlockTreeWindow.py
===================================================================
--- gnuradio/trunk/grc/src/gui/BlockTreeWindow.py       2009-05-01 22:44:28 UTC 
(rev 10945)
+++ gnuradio/trunk/grc/src/gui/BlockTreeWindow.py       2009-05-02 07:55:12 UTC 
(rev 10946)
@@ -80,10 +80,11 @@
                """
                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]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]