dont hide vlen controller when vlen > 1
authorjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Tue, 20 Jan 2009 23:36:17 +0000 (23:36 +0000)
committerjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Tue, 20 Jan 2009 23:36:17 +0000 (23:36 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10272 221aa14e-8319-0410-a670-987f0aec2ac5

grc/src/platforms/python/Param.py
grc/todo.txt

index ca2196ab705687e6a6fa4056846f67f576e25c02..42406788fd8c52e68fb1ad734f86d29c5edfad65 100644 (file)
@@ -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
index ef5914d95f7f670f6b9c5ab6fd79fbc23e11b8c9..54302e409a8ed1647f259253a61cb6e74e9a2887 100644 (file)
@@ -15,7 +15,6 @@
 -change param dialog to panel within main window
 -command line option for additional block wrappers
 -log slider gui control
--icons for certain blocks, + for add
 -zoom in/out (cairo vector graphics) (use scroll wheel as control)
 -search for blocks
 -click and drag on whitespace to scroll
@@ -29,7 +28,6 @@
 -auto generate hier library
 -auto clean hier library
 -add hier blocks to tree without restart?
--dont hide vlen controller when vlen > 1
 -dont generate py files in .grc file dir
 -save/restore cwd
 -special connection validation rules for disabled blocks