mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-12-27 03:18:30 +01:00
soapy_source: always show the Refresh button
This commit is contained in:
parent
f572d12936
commit
99441ea2eb
@ -354,12 +354,17 @@ private:
|
|||||||
static void menuHandler(void* ctx) {
|
static void menuHandler(void* ctx) {
|
||||||
SoapyModule* _this = (SoapyModule*)ctx;
|
SoapyModule* _this = (SoapyModule*)ctx;
|
||||||
|
|
||||||
// If no device is available, do not attempt to display menu
|
float menuWidth = ImGui::GetContentRegionAvailWidth();
|
||||||
|
|
||||||
|
// If no device is selected, draw just the refresh button
|
||||||
if (_this->devId < 0) {
|
if (_this->devId < 0) {
|
||||||
return;
|
if (ImGui::Button(CONCAT("Refresh##_dev_select_", _this->name), ImVec2(menuWidth, 0))) {
|
||||||
|
_this->refresh();
|
||||||
|
_this->selectDevice(config.conf["device"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
float menuWidth = ImGui::GetContentRegionAvailWidth();
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_this->running) { style::beginDisabled(); }
|
if (_this->running) { style::beginDisabled(); }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user