- if (!_decode_traces.empty()) {
- qDebug("Currently only one decode trace can be added "
- "at once");
- _decode_traces.clear();
+ // Create the decoder
+ decoder_stack = shared_ptr<data::DecoderStack>(
+ new data::DecoderStack(dec));
+
+ // Auto select the initial probes
+ for(const GSList *i = dec->probes; i; i = i->next)
+ {
+ const srd_probe *const probe = (const srd_probe*)i->data;
+ BOOST_FOREACH(shared_ptr<view::Signal> s, _signals)
+ {
+ shared_ptr<view::LogicSignal> l =
+ dynamic_pointer_cast<view::LogicSignal>(s);
+ if (l && QString::fromUtf8(probe->name).
+ toLower().contains(
+ l->get_name().toLower()))
+ probes[probe] = l;
+ }