mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-12-25 02:18:30 +01:00
fix show/hide waterfall keybind not working with the Display menu hidden
This commit is contained in:
parent
7c933d5103
commit
021928bbda
@ -463,6 +463,8 @@ void MainWindow::draw() {
|
||||
}
|
||||
}
|
||||
|
||||
// Process menu keybinds
|
||||
displaymenu::checkKeybinds();
|
||||
|
||||
// Left Column
|
||||
lockWaterfallControls = false;
|
||||
|
@ -127,15 +127,24 @@ namespace displaymenu {
|
||||
uiScaleId = uiScales.valueId(style::uiScale);
|
||||
}
|
||||
|
||||
void setWaterfallShown(bool shown) {
|
||||
showWaterfall = shown;
|
||||
showWaterfall ? gui::waterfall.showWaterfall() : gui::waterfall.hideWaterfall();
|
||||
core::configManager.acquire();
|
||||
core::configManager.conf["showWaterfall"] = showWaterfall;
|
||||
core::configManager.release(true);
|
||||
}
|
||||
|
||||
void checkKeybinds() {
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_Home, false)) {
|
||||
setWaterfallShown(!showWaterfall);
|
||||
}
|
||||
}
|
||||
|
||||
void draw(void* ctx) {
|
||||
float menuWidth = ImGui::GetContentRegionAvail().x;
|
||||
bool homePressed = ImGui::IsKeyPressed(ImGuiKey_Home, false);
|
||||
if (ImGui::Checkbox("Show Waterfall##_sdrpp", &showWaterfall) || homePressed) {
|
||||
if (homePressed) { showWaterfall = !showWaterfall; }
|
||||
showWaterfall ? gui::waterfall.showWaterfall() : gui::waterfall.hideWaterfall();
|
||||
core::configManager.acquire();
|
||||
core::configManager.conf["showWaterfall"] = showWaterfall;
|
||||
core::configManager.release(true);
|
||||
if (ImGui::Checkbox("Show Waterfall##_sdrpp", &showWaterfall)) {
|
||||
setWaterfallShown(showWaterfall);
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Full Waterfall Update##_sdrpp", &fullWaterfallUpdate)) {
|
||||
|
@ -2,5 +2,6 @@
|
||||
|
||||
namespace displaymenu {
|
||||
void init();
|
||||
void checkKeybinds();
|
||||
void draw(void* ctx);
|
||||
}
|
Loading…
Reference in New Issue
Block a user