summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2015-09-22 16:54:49 +0200
committerSebastian Koslowski <koslowski@kit.edu>2015-09-22 17:14:53 +0200
commit649cf8c2f2280aa020287731ee3fdd2ce2454d4a (patch)
treeaa69e125fc04392fefa6c60668ec2961fe667a23
parentc7af4fe271d1d2134a88d63ec914ee9c10c1dce1 (diff)
grc: no block alias param for Options blocks
-rw-r--r--grc/base/Block.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/grc/base/Block.py b/grc/base/Block.py
index 2a20c22ef7..b7918d1467 100644
--- a/grc/base/Block.py
+++ b/grc/base/Block.py
@@ -149,17 +149,15 @@ class Block(Element):
# indistinguishable from normal GR blocks. Make explicit
# checks for them here since they have no work function or
# buffers to manage.
- is_not_virtual_or_pad = ((self._key != "virtual_source") \
- and (self._key != "virtual_sink") \
- and (self._key != "pad_source") \
- and (self._key != "pad_sink"))
+ is_virtual_or_pad = self._key in (
+ "virtual_source", "virtual_sink", "pad_source", "pad_sink")
is_variable = self._key.startswith('variable')
# Disable blocks that are virtual/pads or variables
- if not is_not_virtual_or_pad or is_variable:
+ if is_virtual_or_pad or is_variable:
self._flags += BLOCK_FLAG_DISABLE_BYPASS
- if is_not_virtual_or_pad and not is_variable:
+ if not (is_virtual_or_pad or is_variable or self._key == 'options'):
self.get_params().append(self.get_parent().get_parent().Param(
block=self,
n=odict({'name': 'Block Alias',
@@ -170,7 +168,7 @@ class Block(Element):
})
))
- if (len(sources) or len(sinks)) and is_not_virtual_or_pad:
+ if (len(sources) or len(sinks)) and not is_virtual_or_pad:
self.get_params().append(self.get_parent().get_parent().Param(
block=self,
n=odict({'name': 'Core Affinity',
@@ -180,7 +178,7 @@ class Block(Element):
'tab': ADVANCED_PARAM_TAB
})
))
- if len(sources) and is_not_virtual_or_pad:
+ if len(sources) and not is_virtual_or_pad:
self.get_params().append(self.get_parent().get_parent().Param(
block=self,
n=odict({'name': 'Min Output Buffer',