From: Soeren Apel Date: Sat, 2 Jun 2018 20:12:36 +0000 (+0200) Subject: Fix #807 by disabling trigger widgets when session is not stopped X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f02b6a98dc19c0c076760239e6a394fb370a24ef;p=pulseview.git Fix #807 by disabling trigger widgets when session is not stopped --- diff --git a/pv/views/trace/logicsignal.cpp b/pv/views/trace/logicsignal.cpp index 77e92c0c..38f204b6 100644 --- a/pv/views/trace/logicsignal.cpp +++ b/pv/views/trace/logicsignal.cpp @@ -508,6 +508,12 @@ void LogicSignal::populate_popup_form(QWidget *parent, QFormLayout *form) trigger_bar_->addAction(action); action->setChecked(trigger_match_ == type); } + + // Only allow triggers to be changed when we're stopped + if (session_.get_capture_state() != Session::Stopped) + for (QAction* action : trigger_bar_->findChildren()) + action->setEnabled(false); + form->addRow(tr("Trigger"), trigger_bar_); } }