return stack_;
}
-void DecodeSignal::stack_decoder(const srd_decoder *decoder)
+void DecodeSignal::stack_decoder(const srd_decoder *decoder, bool restart_decode)
{
assert(decoder);
decoder_stacked((void*)dec.get());
- begin_decode();
+ if (restart_decode)
+ begin_decode();
}
void DecodeSignal::remove_decoder(int index)
bool is_decode_signal() const;
const vector< shared_ptr<data::decode::Decoder> >& decoder_stack() const;
- void stack_decoder(const srd_decoder *decoder);
+ void stack_decoder(const srd_decoder *decoder, bool restart_decode=true);
void remove_decoder(int index);
bool toggle_decoder_visibility(int index);
shared_ptr<data::DecodeSignal> signal = add_decode_signal();
if (signal)
- for (const srd_decoder* d : decoders)
- signal->stack_decoder(d);
+ for (unsigned int i = 0; i < decoders.size(); i++) {
+ const srd_decoder* d = decoders[i];
+ signal->stack_decoder(d, !(i < decoders.size() - 1));
+ }
}
#endif