projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RowItem: Split appart visual and layout v offsets
[pulseview.git]
/
pv
/
widgets
/
decodermenu.cpp
diff --git
a/pv/widgets/decodermenu.cpp
b/pv/widgets/decodermenu.cpp
index 23c74a0ac70abe3f1e25db3e871b9a5291349fdf..60eb8e8a576205a8ec480f2a6669fc43695cb82c 100644
(file)
--- a/
pv/widgets/decodermenu.cpp
+++ b/
pv/widgets/decodermenu.cpp
@@
-18,6
+18,8
@@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <cassert>
+
#include <libsigrokdecode/libsigrokdecode.h>
#include "decodermenu.h"
#include <libsigrokdecode/libsigrokdecode.h>
#include "decodermenu.h"
@@
-36,7
+38,8
@@
DecoderMenu::DecoderMenu(QWidget *parent, bool first_level_decoder) :
const srd_decoder *const d = (srd_decoder*)l->data;
assert(d);
const srd_decoder *const d = (srd_decoder*)l->data;
assert(d);
- if (!first_level_decoder || d->probes || d->opt_probes) {
+ const bool have_channels = (d->channels || d->opt_channels) != 0;
+ if (first_level_decoder == have_channels) {
QAction *const action =
addAction(QString::fromUtf8(d->name));
action->setData(qVariantFromValue(l->data));
QAction *const action =
addAction(QString::fromUtf8(d->name));
action->setData(qVariantFromValue(l->data));