From 9f3d12f3573e55f7031510e43bc1583bc7fe72ee Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sat, 20 Apr 2013 18:05:31 +0100 Subject: [PATCH] Commit the samplerate before beginning to sample --- pv/toolbars/samplingbar.cpp | 8 +++++++- pv/toolbars/samplingbar.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pv/toolbars/samplingbar.cpp b/pv/toolbars/samplingbar.cpp index c35faada..401652cb 100644 --- a/pv/toolbars/samplingbar.cpp +++ b/pv/toolbars/samplingbar.cpp @@ -72,7 +72,7 @@ SamplingBar::SamplingBar(QWidget *parent) : _run_stop_button(this) { connect(&_run_stop_button, SIGNAL(clicked()), - this, SIGNAL(run_stop())); + this, SLOT(on_run_stop())); connect(&_device_selector, SIGNAL(currentIndexChanged (int)), this, SLOT(on_device_selected())); connect(&_configure_button, SIGNAL(clicked()), @@ -303,5 +303,11 @@ void SamplingBar::on_configure() update_sample_rate_selector_value(); } +void SamplingBar::on_run_stop() +{ + commit_sample_rate(); + run_stop(); +} + } // namespace toolbars } // namespace pv diff --git a/pv/toolbars/samplingbar.h b/pv/toolbars/samplingbar.h index d7ad4f2f..a61a949e 100644 --- a/pv/toolbars/samplingbar.h +++ b/pv/toolbars/samplingbar.h @@ -68,6 +68,7 @@ private slots: void on_device_selected(); void on_sample_rate_changed(); void on_configure(); + void on_run_stop(); private: QComboBox _device_selector; -- 2.30.2