X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Flogicsignal.cpp;h=c23f09226cd9bfaa2cbaf3d362eca7065ad69088;hp=717360b852fa65b9aedf5a513f578d47a45e1e40;hb=fcc00c4d9d3c4e00a3e15bff666e0ceedfa9d0ea;hpb=4a8185876c7d4dcb0e940df3077f46c0c98de7f9;ds=inline diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index 717360b8..c23f0922 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -447,8 +447,15 @@ void LogicSignal::modify_trigger() } } - if (trigger_match_) - new_trigger->add_stage()->add_match(channel_, trigger_match_); + if (trigger_match_) { + // Until we can let the user decide how to group trigger matches + // into stages, put all of the matches into a single stage -- + // most devices only support a single trigger stage. + if (new_trigger->stages().empty()) + new_trigger->add_stage(); + + new_trigger->stages().back()->add_match(channel_, trigger_match_); + } session_.session()->set_trigger( new_trigger->stages().empty() ? nullptr : new_trigger);