Commit sample count after setting default.
[pulseview.git] / pv / toolbars / samplingbar.cpp
index 9e16c5119384f208f12f7760cb2c06dcca373d04..6109c163ef4b11ecd6d8fdcc873618e44dc17a66 100644 (file)
@@ -285,8 +285,10 @@ void SamplingBar::on_device_selected()
        update_sample_count_selector();
        update_sample_rate_selector();
 
-       if (_sample_count.value() == 0)
+       if (_sample_count.value() == 0) {
                _sample_count.set_value(DefaultRecordLength);
+               commit_sample_count();
+       }
 }
 
 void SamplingBar::on_sample_count_changed()