From: Soeren Apel Date: Wed, 15 Mar 2017 18:22:17 +0000 (+0100) Subject: Use presence of logic/analog data as indicator of channel type X-Git-Tag: pulseview-0.4.0~139 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=79c4a9c8a28765422075b77b0dca23cd248c4d18;p=pulseview.git 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. --- 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()));