soapy_source: always show the Refresh button

pull/328/head
ericek111 2021-08-30 00:12:13 +02:00
rodzic f572d12936
commit 99441ea2eb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F850D0320BA802C9
1 zmienionych plików z 10 dodań i 5 usunięć

Wyświetl plik

@ -353,13 +353,18 @@ private:
static void menuHandler(void* ctx) {
SoapyModule* _this = (SoapyModule*)ctx;
// If no device is available, do not attempt to display menu
if (_this->devId < 0) {
return;
}
float menuWidth = ImGui::GetContentRegionAvailWidth();
// If no device is selected, draw just the refresh button
if (_this->devId < 0) {
if (ImGui::Button(CONCAT("Refresh##_dev_select_", _this->name), ImVec2(menuWidth, 0))) {
_this->refresh();
_this->selectDevice(config.conf["device"]);
}
return;
}
if (_this->running) { style::beginDisabled(); }