]> sigrok.org Git - pulseview.git/commitdiff
SamplingBar: Only use DefaultSampleCount if the _sample_count widget is unset.
authorJoel Holdsworth <redacted>
Sat, 1 Mar 2014 16:30:07 +0000 (16:30 +0000)
committerJoel Holdsworth <redacted>
Sat, 1 Mar 2014 16:30:13 +0000 (16:30 +0000)
This fixes bug #324

pv/toolbars/samplingbar.cpp

index be29e74bb534643183fd739e5d1785f63f974e22..dce7aa38417753c7927f3eefa0c23cd0369b7ae4 100644 (file)
@@ -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)",