From 37ad6365e3b5a909859f4fcf5a96d644ab72ea10 Mon Sep 17 00:00:00 2001 From: Ryzerth Date: Sat, 10 Apr 2021 15:05:45 +0200 Subject: [PATCH] Another fix 2 --- plutosdr_source/src/main.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/plutosdr_source/src/main.cpp b/plutosdr_source/src/main.cpp index 582380f..6186da3 100644 --- a/plutosdr_source/src/main.cpp +++ b/plutosdr_source/src/main.cpp @@ -170,13 +170,11 @@ private: ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); if (_this->running) { style::beginDisabled(); } if (ImGui::InputFloat(CONCAT("##_samplerate_select_", _this->name), &_this->sampleRate, 1, 1000, 0)) { - if (_this->sampleRate > 0) { - _this->sampleRate = std::clamp(_this->sampleRate, 500000, 61000000); - core::setInputSampleRate(_this->sampleRate); - config.aquire(); - config.conf["sampleRate"] = _this->sampleRate; - config.release(true); - } + _this->sampleRate = std::clamp(_this->sampleRate, 500000, 61000000); + core::setInputSampleRate(_this->sampleRate); + config.aquire(); + config.conf["sampleRate"] = _this->sampleRate; + config.release(true); } if (_this->running) { style::endDisabled(); }