From 7c1d1cad22e0efcf0821b8d4865048689981dd15 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Mon, 30 Aug 2021 15:53:41 +0200 Subject: [PATCH] Switched the place of the Sample rate and IF mode combos --- sdrplay_source/src/main.cpp | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/sdrplay_source/src/main.cpp b/sdrplay_source/src/main.cpp index 7f10a8a6..bfeb988c 100644 --- a/sdrplay_source/src/main.cpp +++ b/sdrplay_source/src/main.cpp @@ -681,26 +681,6 @@ private: config.conf["device"] = _this->devNameList[_this->devId]; config.release(true); } - - ImGui::Text("IF Mode"); - ImGui::SameLine(); - ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); - if (ImGui::Combo(CONCAT("##sdrplay_ifmode", _this->name), &_this->ifModeId, ifModeTxt)) { - if(_this->ifModeId != 0){ - _this->bandwidth = ifModes[_this->ifModeId].bw; - _this->sampleRate = ifModes[_this->ifModeId].effectiveSamplerate; - } else { - config.acquire(); - _this->sampleRate = config.conf["devices"][_this->selectedName]["sampleRate"]; - _this->bandwidthId = config.conf["devices"][_this->selectedName]["bwMode"]; - config.release(false); - _this->bandwidth = (_this->bandwidthId == 8) ? preferedBandwidth[_this->srId] : bandwidths[_this->bandwidthId]; - } - core::setInputSampleRate(_this->sampleRate); - config.acquire(); - config.conf["devices"][_this->selectedName]["ifModeId"] = _this->ifModeId; - config.release(true); - } if (_this->ifModeId == 0) { if (ImGui::Combo(CONCAT("##sdrplay_sr", _this->name), &_this->srId, sampleRatesTxt)) { @@ -733,6 +713,26 @@ private: config.release(true); } } + + ImGui::Text("IF Mode"); + ImGui::SameLine(); + ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); + if (ImGui::Combo(CONCAT("##sdrplay_ifmode", _this->name), &_this->ifModeId, ifModeTxt)) { + if(_this->ifModeId != 0){ + _this->bandwidth = ifModes[_this->ifModeId].bw; + _this->sampleRate = ifModes[_this->ifModeId].effectiveSamplerate; + } else { + config.acquire(); + _this->sampleRate = config.conf["devices"][_this->selectedName]["sampleRate"]; + _this->bandwidthId = config.conf["devices"][_this->selectedName]["bwMode"]; + config.release(false); + _this->bandwidth = (_this->bandwidthId == 8) ? preferedBandwidth[_this->srId] : bandwidths[_this->bandwidthId]; + } + core::setInputSampleRate(_this->sampleRate); + config.acquire(); + config.conf["devices"][_this->selectedName]["ifModeId"] = _this->ifModeId; + config.release(true); + } if (_this->running) { style::endDisabled(); }