diff options
author | jblum | 2009-01-20 23:36:17 +0000 |
---|---|---|
committer | jblum | 2009-01-20 23:36:17 +0000 |
commit | 9931fdf6e91914407a604c9f84a37e66498ceb85 (patch) | |
tree | 5ce0e53108781ee40c060eec15965c3d9c5f79f7 /grc/src/platforms/python/Param.py | |
parent | a6b928438657b86426c6ca04adec2030a865dab2 (diff) | |
download | gnuradio-9931fdf6e91914407a604c9f84a37e66498ceb85.tar.gz gnuradio-9931fdf6e91914407a604c9f84a37e66498ceb85.tar.bz2 gnuradio-9931fdf6e91914407a604c9f84a37e66498ceb85.zip |
dont hide vlen controller when vlen > 1
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10272 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/src/platforms/python/Param.py')
-rw-r--r-- | grc/src/platforms/python/Param.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/grc/src/platforms/python/Param.py b/grc/src/platforms/python/Param.py index ca2196ab7..42406788f 100644 --- a/grc/src/platforms/python/Param.py +++ b/grc/src/platforms/python/Param.py @@ -130,10 +130,18 @@ class Param(_Param): if self.get_key() == 'id' and self.get_parent().get_key() not in ( 'variable', 'variable_slider', 'variable_chooser', 'variable_text_box', 'parameter', 'options' ): return 'part' - #hide port controllers + #hide port controllers for type and nports if self.get_key() in ' '.join(map( - lambda p: ' '.join([p._type, p._vlen, p._nports]), self.get_parent().get_ports()) + lambda p: ' '.join([p._type, p._nports]), self.get_parent().get_ports()) ): return 'part' + #hide port controllers for vlen, when == 1 + if self.get_key() in ' '.join(map( + lambda p: p._vlen, self.get_parent().get_ports()) + ): + try: + assert int(self.evaluate()) == 1 + return 'part' + except: pass #hide empty grid positions if self.get_key() == 'grid_pos' and not self.get_value(): return 'part' return hide |