summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
Diffstat (limited to 'grc')
-rw-r--r--grc/base/Param.py2
-rw-r--r--grc/blocks/wxgui_scopesink2.xml7
2 files changed, 8 insertions, 1 deletions
diff --git a/grc/base/Param.py b/grc/base/Param.py
index e56eac36e1..5cd0f9d6d8 100644
--- a/grc/base/Param.py
+++ b/grc/base/Param.py
@@ -94,7 +94,7 @@ class Param(Element):
try: assert set(opt_keys) == set(option.get_opt_keys())
except AssertionError: raise Exception, 'Opt keys "%s" are not identical across all options.'%opt_keys
#if a value is specified, it must be in the options keys
- self._value = value or self.get_option_keys()[0]
+ self._value = value if value or value in self.get_option_keys() else self.get_option_keys()[0]
try: assert self.get_value() in self.get_option_keys()
except AssertionError: raise Exception, 'The value "%s" is not in the possible values of "%s".'%(self.get_value(), self.get_option_keys())
else: self._value = value or ''
diff --git a/grc/blocks/wxgui_scopesink2.xml b/grc/blocks/wxgui_scopesink2.xml
index 50cd977be2..ef03773739 100644
--- a/grc/blocks/wxgui_scopesink2.xml
+++ b/grc/blocks/wxgui_scopesink2.xml
@@ -21,6 +21,7 @@ scopesink2.$(type.fcn)(
xy_mode=$xy_mode,
num_inputs=$num_inputs,
trig_mode=$trig_mode,
+ y_axis_label=$y_axis_label,
#if $win_size()
size=$win_size,
#end if
@@ -156,6 +157,12 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos()))))
<key>gr.gr_TRIG_MODE_STRIPCHART</key>
</option>
</param>
+ <param>
+ <name>Y Axis Label</name>
+ <key>y_axis_label</key>
+ <value>Counts</value>
+ <type>string</type>
+ </param>
<check>not $win_size or len($win_size) == 2</check>
<check>not $xy_mode or '$type' == 'complex' or $num_inputs != 1</check>
<sink>