From: Joel Holdsworth Date: Sat, 15 Mar 2014 07:58:58 +0000 (+0100) Subject: Don't show decoders with probes in the Stack Decoder menu X-Git-Tag: pulseview-0.2.0~16 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=76868203e56032aa21d7909b5fd72c50b5505615 Don't show decoders with probes in the Stack Decoder menu This fixes #333 --- diff --git a/pv/widgets/decodermenu.cpp b/pv/widgets/decodermenu.cpp index 23c74a0a..ff687e4c 100644 --- a/pv/widgets/decodermenu.cpp +++ b/pv/widgets/decodermenu.cpp @@ -36,7 +36,8 @@ DecoderMenu::DecoderMenu(QWidget *parent, bool first_level_decoder) : const srd_decoder *const d = (srd_decoder*)l->data; assert(d); - if (!first_level_decoder || d->probes || d->opt_probes) { + const bool have_probes = (d->probes || d->opt_probes) != 0; + if (first_level_decoder == have_probes) { QAction *const action = addAction(QString::fromUtf8(d->name)); action->setData(qVariantFromValue(l->data));