From a483a34ff24729d466d3a2e5129729107e06384d Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 14 Jan 2023 20:09:52 +0100 Subject: [PATCH] Fixed an issue where the custom collections editing mode would not end when switching UI modes. Also removed some unused code in GuiMenu. --- es-app/src/guis/GuiMenu.cpp | 14 ++------------ es-app/src/guis/GuiMenu.h | 1 - 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 5e6bacdbe..b2d846677 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -62,11 +62,6 @@ GuiMenu::GuiMenu() if (isFullUI) addEntry("OTHER SETTINGS", 0x777777FF, true, [this] { openOtherOptions(); }); - // TEMPORARY: Disabled for now, will be used in the future. - // if (isFullUI) - // addEntry("UTILITIES", 0x777777FF, true, [this] { - // openUtilitiesMenu(); }); - if (!Settings::getInstance()->getBool("ForceKiosk") && Settings::getInstance()->getString("UIMode") != "kiosk") { if (Settings::getInstance()->getBool("ShowQuitMenu")) @@ -617,6 +612,8 @@ void GuiMenu::openUIOptions() Settings::getInstance()->setBool("ForceKiosk", false); Settings::getInstance()->setBool("ForceKid", false); Settings::getInstance()->saveFile(); + if (CollectionSystemsManager::getInstance()->isEditing()) + CollectionSystemsManager::getInstance()->exitEditMode(); UIModeController::getInstance()->setCurrentUIMode(selectedMode); for (auto it = SystemData::sSystemVector.cbegin(); it != SystemData::sSystemVector.cend(); ++it) { @@ -1500,13 +1497,6 @@ void GuiMenu::openOtherOptions() mWindow->pushGui(s); } -void GuiMenu::openUtilitiesMenu() -{ - auto s = new GuiSettings("UTILITIES"); - s->setSize(mSize); - mWindow->pushGui(s); -} - void GuiMenu::openQuitMenu() { if (!Settings::getInstance()->getBool("ShowQuitMenu")) { diff --git a/es-app/src/guis/GuiMenu.h b/es-app/src/guis/GuiMenu.h index 64b37480d..9f021e6b8 100644 --- a/es-app/src/guis/GuiMenu.h +++ b/es-app/src/guis/GuiMenu.h @@ -43,7 +43,6 @@ private: void openConfigInput(GuiSettings* settings); void openCollectionSystemOptions(); void openOtherOptions(); - void openUtilitiesMenu(); void openQuitMenu(); MenuComponent mMenu;