projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nsis: Fix the "working dir" path for PulseView.
[pulseview.git]
/
pv
/
toolbars
/
samplingbar.cpp
diff --git
a/pv/toolbars/samplingbar.cpp
b/pv/toolbars/samplingbar.cpp
index 78f6e1cef53a7929bd87b86914a5404ca53eabef..dce7aa38417753c7927f3eefa0c23cd0369b7ae4 100644
(file)
--- a/
pv/toolbars/samplingbar.cpp
+++ b/
pv/toolbars/samplingbar.cpp
@@
-264,10
+264,13
@@
void SamplingBar::update_sample_count_selector()
if (_sample_count_supported)
{
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;
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)",
if ((gvar = dev_inst->list_config(NULL, SR_CONF_LIMIT_SAMPLES)))
{
g_variant_get(gvar, "(tt)",
@@
-316,7
+319,8
@@
void SamplingBar::commit_sample_count()
// Set the sample count
assert(!_updating_sample_count);
_updating_sample_count = true;
// Set the sample count
assert(!_updating_sample_count);
_updating_sample_count = true;
- if (!dev_inst->set_config(NULL, SR_CONF_LIMIT_SAMPLES,
+ if (_sample_count_supported &&
+ !dev_inst->set_config(NULL, SR_CONF_LIMIT_SAMPLES,
g_variant_new_uint64(sample_count))) {
qDebug() << "Failed to configure sample count.";
return;
g_variant_new_uint64(sample_count))) {
qDebug() << "Failed to configure sample count.";
return;