]> sigrok.org Git - pulseview.git/commitdiff
Wait until SDI is set before updating sweep timing widgets.
authorMartin Ling <redacted>
Tue, 14 Jan 2014 20:12:26 +0000 (20:12 +0000)
committerJoel Holdsworth <redacted>
Sat, 18 Jan 2014 22:56:12 +0000 (22:56 +0000)
pv/toolbars/samplingbar.cpp

index 914083c3c0a50ea1968caffa21cd8ee23e9ad248..9e16c5119384f208f12f7760cb2c06dcca373d04 100644 (file)
@@ -268,12 +268,6 @@ void SamplingBar::on_device_selected()
        if (_updating_device_selector)
                return;
 
-       update_sample_count_selector();
-       update_sample_rate_selector();
-
-       if (_sample_count.value() == 0)
-               _sample_count.set_value(DefaultRecordLength);
-
        sr_dev_inst *const sdi = get_selected_device();
        _session.set_device(sdi);
 
@@ -286,6 +280,13 @@ void SamplingBar::on_device_selected()
        // Update the probes popup
        Probes *const probes = new Probes(_session, this);
        _probes_button.set_popup(probes);
+
+       // Update sweep timing widgets.
+       update_sample_count_selector();
+       update_sample_rate_selector();
+
+       if (_sample_count.value() == 0)
+               _sample_count.set_value(DefaultRecordLength);
 }
 
 void SamplingBar::on_sample_count_changed()