]> sigrok.org Git - pulseview.git/commitdiff
Fix #807 by disabling trigger widgets when session is not stopped
authorSoeren Apel <redacted>
Sat, 2 Jun 2018 20:12:36 +0000 (22:12 +0200)
committerUwe Hermann <redacted>
Sun, 3 Jun 2018 17:02:28 +0000 (19:02 +0200)
pv/views/trace/logicsignal.cpp

index 77e92c0cc2788f97eadedd8de04d560fcf571002..38f204b6e255c2bf93940a7b3b70d2baac91cd9e 100644 (file)
@@ -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<QAction*>())
+                               action->setEnabled(false);
+
                form->addRow(tr("Trigger"), trigger_bar_);
        }
 }