]> sigrok.org Git - pulseview.git/commitdiff
Updated the sample rate selector when the config is changed
authorJoel Holdsworth <redacted>
Sun, 9 Feb 2014 19:45:21 +0000 (19:45 +0000)
committerJoel Holdsworth <redacted>
Tue, 11 Feb 2014 21:44:46 +0000 (21:44 +0000)
pv/toolbars/samplingbar.cpp
pv/toolbars/samplingbar.h

index e55bbda8316cb4482dd9f9ec2ef4b57a46773d12..27af7c7b8acfd1cc6787cfbe70f6c917f08ac1ea 100644 (file)
@@ -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
index 94d9344e1e07b4403d474e8b2748fc6c4149c478..454d607931be9633354549a43d89ba137c744024 100644 (file)
@@ -82,6 +82,8 @@ private slots:
        void on_sample_rate_changed();
        void on_run_stop();
 
+       void on_config_changed();
+
 private:
        SigSession &_session;