From 89c579880c3fa14c3376ef40ff92df0f89978a34 Mon Sep 17 00:00:00 2001 From: Alexsey Date: Mon, 14 Dec 2020 19:46:05 +0500 Subject: [PATCH] Soapy: Refresh button --- soapy_source/src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/soapy_source/src/main.cpp b/soapy_source/src/main.cpp index f3cff9a3..7a818d7d 100644 --- a/soapy_source/src/main.cpp +++ b/soapy_source/src/main.cpp @@ -138,7 +138,6 @@ private: txtSrList = ""; for (double sr : sampleRates) { if (sr > 1.0e3 && sr <= 1.0e6) { - txtSrList += std::to_string((sr / 1.0e3)) + " kHz"; } else if (sr > 1.0e6) { txtSrList += std::to_string((sr / 1.0e6)) + " MHz"; @@ -296,8 +295,9 @@ private: _this->selectSampleRate(_this->sampleRates[_this->srId]); _this->saveCurrent(); } - ImGui::SetNextItemWidth(menuWidth); - if (ImGui::Button(CONCAT("Refresh##_dev_select_", _this->name))) { + + if (ImGui::Button(CONCAT("Refresh##_dev_select_", _this->name), + ImVec2(menuWidth - ImGui::GetCursorPosX(), 0.0))) { _this->refresh(); _this->selectDevice(config.conf["device"]); }