From: Joel Holdsworth Date: Sun, 9 Feb 2014 19:45:21 +0000 (+0000) Subject: Updated the sample rate selector when the config is changed X-Git-Tag: pulseview-0.2.0~77 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=82afd5e35c8113b719d78e5c654edf933375218a;p=pulseview.git Updated the sample rate selector when the config is changed --- diff --git a/pv/toolbars/samplingbar.cpp b/pv/toolbars/samplingbar.cpp index e55bbda8..27af7c7b 100644 --- a/pv/toolbars/samplingbar.cpp +++ b/pv/toolbars/samplingbar.cpp @@ -398,6 +398,11 @@ void SamplingBar::on_device_selected() } } + // Add notification of reconfigure events + disconnect(this, SLOT(on_config_changed())); + connect(dev_inst.get(), SIGNAL(config_changed()), + this, SLOT(on_config_changed())); + // Update sweep timing widgets. update_sample_count_selector(); update_sample_rate_selector(); @@ -420,5 +425,13 @@ void SamplingBar::on_run_stop() run_stop(); } +void SamplingBar::on_config_changed() +{ + commit_sample_count(); + update_sample_count_selector(); + commit_sample_rate(); + update_sample_rate_selector(); +} + } // namespace toolbars } // namespace pv diff --git a/pv/toolbars/samplingbar.h b/pv/toolbars/samplingbar.h index 94d9344e..454d6079 100644 --- a/pv/toolbars/samplingbar.h +++ b/pv/toolbars/samplingbar.h @@ -82,6 +82,8 @@ private slots: void on_sample_rate_changed(); void on_run_stop(); + void on_config_changed(); + private: SigSession &_session;