From ef5ca9fe51dc45c0332e41db36f822f145f6116a Mon Sep 17 00:00:00 2001 From: Volker Schroer <3470424+dl1ksv@users.noreply.github.com> Date: Fri, 30 Aug 2019 17:06:00 +0200 Subject: Reintroduce default setting in qtgui_chooser In gnuradio 3.7 it was possible to select an option as default option. In 3.8 /3.9 the default option is always option 0. --- gr-qtgui/grc/qtgui_chooser.block.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gr-qtgui/grc/qtgui_chooser.block.yml b/gr-qtgui/grc/qtgui_chooser.block.yml index 4206d705f..df27f0246 100644 --- a/gr-qtgui/grc/qtgui_chooser.block.yml +++ b/gr-qtgui/grc/qtgui_chooser.block.yml @@ -31,7 +31,11 @@ parameters: default: '[]' hide: ${ ('all' if int(num_opts) else 'none') } - id: value - label: Option 0 (Default) + label: Default option + dtype: ${type} + default: '0' +- id: option0 + label: Option 0 dtype: ${ type } default: '0' hide: ${ ('none' if int(num_opts) > 0 else 'all') } @@ -105,7 +109,7 @@ templates: - self._${id}_callback(${id}) make: |- <% - all_options = [ value, option1, option2, option3, option4 ][:int(num_opts)] + all_options = [ option0, option1, option2, option3, option4 ][:int(num_opts)] all_labels = [ label0, label1, label2, label3, label4 ][:int(num_opts)] %>\ # Create the options list -- cgit v1.2.3-59-g8ed1b