From 79c4a9c8a28765422075b77b0dca23cd248c4d18 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Wed, 15 Mar 2017 19:22:17 +0100 Subject: [PATCH] Use presence of logic/analog data as indicator of channel type However, don't do this for the StoreSession. Reason is that we only want to save the original data and not treat any converted data as its own channel. --- pv/session.cpp | 2 +- pv/view/decodetrace.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pv/session.cpp b/pv/session.cpp index 2712af12..f5f1e497 100644 --- a/pv/session.cpp +++ b/pv/session.cpp @@ -637,7 +637,7 @@ bool Session::add_decoder(srd_decoder *const dec) // Auto select the initial channels for (const srd_channel *pdch : all_channels) for (shared_ptr b : signalbases_) { - if (b->type() == data::SignalBase::LogicChannel) { + if (b->logic_data()) { if (QString::fromUtf8(pdch->name).toLower(). contains(b->name().toLower())) channels[pdch] = b; diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index 5944fd64..0d8a0edb 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -877,7 +877,7 @@ QComboBox* DecodeTrace::create_channel_selector( for (const shared_ptr &b : sig_list) { assert(b); - if (b->type() == data::SignalBase::LogicChannel && b->enabled()) { + if (b->logic_data() && b->enabled()) { selector->addItem(b->name(), qVariantFromValue((void*)b.get())); -- 2.30.2