From d2419d1fbdedec1571275c8f7099b51898901db7 Mon Sep 17 00:00:00 2001 From: Pawel Olejniczak Date: Fri, 12 Mar 2021 13:56:05 +0100 Subject: [PATCH] [EGD-6150] Clean bottom bar after unpairing last device from the list FORGET and CONNECT/DISCONNECT buttons were not removed after the last device was removed from the list in All Devices window. --- .../application-settings-new/windows/AllDevicesWindow.cpp | 2 ++ .../application-settings-new/windows/AllDevicesWindow.hpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/module-apps/application-settings-new/windows/AllDevicesWindow.cpp b/module-apps/application-settings-new/windows/AllDevicesWindow.cpp index c1717c29bb1fb6c6366a366faeaf7e3cc4f219da..c5b6862f667519e78a45212a9e251da35691759b 100644 --- a/module-apps/application-settings-new/windows/AllDevicesWindow.cpp +++ b/module-apps/application-settings-new/windows/AllDevicesWindow.cpp @@ -74,6 +74,8 @@ namespace gui return (bd_addr_to_str(device.address) == addressOfSelectedDevice); }), devices.end()); + bottomBar->setActive(BottomBar::Side::LEFT, false); + bottomBar->setActive(BottomBar::Side::CENTER, false); refreshOptionsList(); bluetoothSettingsModel->requestDeviceUnpair(addressOfSelectedDevice); return true; diff --git a/module-apps/application-settings-new/windows/AllDevicesWindow.hpp b/module-apps/application-settings-new/windows/AllDevicesWindow.hpp index 5f59d52d7095da61d88de6f4746539198ce712ee..6a2f3b7bc44cae7f4a894e80d541df5cfcb853b8 100644 --- a/module-apps/application-settings-new/windows/AllDevicesWindow.hpp +++ b/module-apps/application-settings-new/windows/AllDevicesWindow.hpp @@ -24,10 +24,10 @@ namespace gui Image *leftArrowImage = nullptr; Image *crossImage = nullptr; - std::vector devices; + std::vector devices{}; std::string addressOfConnectedDevice; std::string addressOfSelectedDevice; - std::unique_ptr bluetoothSettingsModel; + std::unique_ptr bluetoothSettingsModel{}; }; } // namespace gui