[chirp_devel] [PATCH] Fix radio browser exposing children in tree with nothing to see

Dan Smith
Sun Sep 8 17:18:17 PDT 2013


# HG changeset patch
# User Dan Smith <dsmith at danplanet.com>
# Date 1378685894 25200
# Node ID 47fbab94e7c1121fd3efe3c0baa344768ea722d2
# Parent  9a3c970aec76fc46ab49750dd1df3711aafb87ee
Fix radio browser exposing children in tree with nothing to see

Right now, the radio browser will expose the elements of an array
as children in the tree, but clicking on them yields nothing as
arrays are exposed at the top level. This avoids adding those
elements to the tree to avoid confusion.

(need a bug here)

diff -r 9a3c970aec76 -r 47fbab94e7c1 chirpui/radiobrowser.py
--- a/chirpui/radiobrowser.py	Sun Sep 08 17:18:08 2013 -0700
+++ b/chirpui/radiobrowser.py	Sun Sep 08 17:18:14 2013 -0700
@@ -234,7 +234,8 @@
         elif isinstance(obj, bitwise.arrayDataElement):
             i = 0
             for item in obj:
-                self._fill("%s[%i]" % (name, i), item, iter)
+                if isinstance(obj[0], bitwise.structDataElement):
+                    self._fill("%s[%i]" % (name, i), item, iter)
                 i += 1
 
     def _tree_click(self, view, event):



More information about the chirp_devel mailing list