Merged r11309:11357 from grc branch.
[debian/gnuradio] / grc / base / Platform.py
index 3050e5e475cde8e9bfe3fb2fb1d92544fc7118a3..02d6d2319257e969c1b8b4f151b02556698df6ab 100644 (file)
@@ -129,7 +129,9 @@ class Platform(_Element):
                                if block_key not in self.get_block_keys():
                                        print >> sys.stderr, 'Warning: Block key "%s" not found when loading category tree.'%(block_key)
                                        continue
-                               block_tree.add_block(parent, self.get_block(block_key))
+                               block = self.get_block(block_key)
+                               #if it exists, the block's category overrides the block tree
+                               if not block.get_category(): block_tree.add_block(parent, block)
                #load the block tree
                for block_tree_file in self._block_tree_files:
                        #recursivly add all blocks in the tree