From: Martin Ling Date: Tue, 14 Jan 2014 20:12:26 +0000 (+0000) Subject: Wait until SDI is set before updating sweep timing widgets. X-Git-Tag: pulseview-0.2.0~127 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=df5396800830d41a83a837b95b0f3787571905cf;p=pulseview.git Wait until SDI is set before updating sweep timing widgets. --- diff --git a/pv/toolbars/samplingbar.cpp b/pv/toolbars/samplingbar.cpp index 914083c3..9e16c511 100644 --- a/pv/toolbars/samplingbar.cpp +++ b/pv/toolbars/samplingbar.cpp @@ -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()