projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
220801e
)
MainBar: Disallow negative sample rates
author
Soeren Apel
<soeren@apelpie.net>
Fri, 10 Aug 2018 21:35:38 +0000
(23:35 +0200)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Tue, 21 Aug 2018 10:02:38 +0000
(12:02 +0200)
pv/toolbars/mainbar.cpp
patch
|
blob
|
history
diff --git
a/pv/toolbars/mainbar.cpp
b/pv/toolbars/mainbar.cpp
index d78a153f160d0f14e45969572cfe671269ba07f0..3ee62f4c3dabbd519ced10b1f26c4f410bb2742e 100644
(file)
--- a/
pv/toolbars/mainbar.cpp
+++ b/
pv/toolbars/mainbar.cpp
@@
-509,8
+509,8
@@
void MainBar::commit_sample_rate()
const shared_ptr<sigrok::Device> sr_dev = device->device();
sample_rate = sample_rate_.value();
- if (sample_rate
==
0)
-
return
;
+ if (sample_rate
<
0)
+
sample_rate_.set_value(0)
;
try {
sr_dev->config_set(ConfigKey::SAMPLERATE,