]> sigrok.org Git - pulseview.git/blobdiff - pv/toolbars/samplingbar.cpp
Update the SigSession device, when it is selected by the user
[pulseview.git] / pv / toolbars / samplingbar.cpp
index aa43f9c9526cf2dfa2d859cc22f95e307a5cb8f7..7e052f81cf6c16e77d91307fc956097fff410711 100644 (file)
@@ -72,11 +72,11 @@ 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()),
-               this, SLOT(configure()));
+               this, SLOT(on_configure()));
 
        _sample_rate_value.setDecimals(0);
        _sample_rate_value.setSuffix("Hz");
@@ -283,6 +283,7 @@ void SamplingBar::commit_sample_rate()
 void SamplingBar::on_device_selected()
 {
        update_sample_rate_selector();
+       device_selected();
 }
 
 void SamplingBar::on_sample_rate_changed()
@@ -290,7 +291,7 @@ void SamplingBar::on_sample_rate_changed()
        commit_sample_rate();
 }
 
-void SamplingBar::configure()
+void SamplingBar::on_configure()
 {
        commit_sample_rate();
 
@@ -303,5 +304,11 @@ void SamplingBar::configure()
        update_sample_rate_selector_value();
 }
 
+void SamplingBar::on_run_stop()
+{
+       commit_sample_rate();   
+       run_stop();
+}
+
 } // namespace toolbars
 } // namespace pv