From: Joel Holdsworth Date: Sat, 1 Mar 2014 16:30:07 +0000 (+0000) Subject: SamplingBar: Only use DefaultSampleCount if the _sample_count widget is unset. X-Git-Tag: pulseview-0.2.0~44 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=3cbffdcf7c99c9722f9ba7b8b9e483c2f6132b68;p=pulseview.git SamplingBar: Only use DefaultSampleCount if the _sample_count widget is unset. This fixes bug #324 --- diff --git a/pv/toolbars/samplingbar.cpp b/pv/toolbars/samplingbar.cpp index be29e74b..dce7aa38 100644 --- a/pv/toolbars/samplingbar.cpp +++ b/pv/toolbars/samplingbar.cpp @@ -264,10 +264,13 @@ void SamplingBar::update_sample_count_selector() if (_sample_count_supported) { - uint64_t sample_count = DefaultSampleCount; + uint64_t sample_count = _sample_count.value(); uint64_t min_sample_count = 0; uint64_t max_sample_count = MaxSampleCount; + if (sample_count == 0) + sample_count = DefaultSampleCount; + if ((gvar = dev_inst->list_config(NULL, SR_CONF_LIMIT_SAMPLES))) { g_variant_get(gvar, "(tt)",