Fixed an issue where the custom collections editing mode would not end when switching UI modes.

Also removed some unused code in GuiMenu.
This commit is contained in:
Leon Styhre 2023-01-14 20:09:52 +01:00
parent 110911df2e
commit a483a34ff2
2 changed files with 2 additions and 13 deletions

View file

@ -62,11 +62,6 @@ GuiMenu::GuiMenu()
if (isFullUI) if (isFullUI)
addEntry("OTHER SETTINGS", 0x777777FF, true, [this] { openOtherOptions(); }); 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") && if (!Settings::getInstance()->getBool("ForceKiosk") &&
Settings::getInstance()->getString("UIMode") != "kiosk") { Settings::getInstance()->getString("UIMode") != "kiosk") {
if (Settings::getInstance()->getBool("ShowQuitMenu")) if (Settings::getInstance()->getBool("ShowQuitMenu"))
@ -617,6 +612,8 @@ void GuiMenu::openUIOptions()
Settings::getInstance()->setBool("ForceKiosk", false); Settings::getInstance()->setBool("ForceKiosk", false);
Settings::getInstance()->setBool("ForceKid", false); Settings::getInstance()->setBool("ForceKid", false);
Settings::getInstance()->saveFile(); Settings::getInstance()->saveFile();
if (CollectionSystemsManager::getInstance()->isEditing())
CollectionSystemsManager::getInstance()->exitEditMode();
UIModeController::getInstance()->setCurrentUIMode(selectedMode); UIModeController::getInstance()->setCurrentUIMode(selectedMode);
for (auto it = SystemData::sSystemVector.cbegin(); for (auto it = SystemData::sSystemVector.cbegin();
it != SystemData::sSystemVector.cend(); ++it) { it != SystemData::sSystemVector.cend(); ++it) {
@ -1500,13 +1497,6 @@ void GuiMenu::openOtherOptions()
mWindow->pushGui(s); mWindow->pushGui(s);
} }
void GuiMenu::openUtilitiesMenu()
{
auto s = new GuiSettings("UTILITIES");
s->setSize(mSize);
mWindow->pushGui(s);
}
void GuiMenu::openQuitMenu() void GuiMenu::openQuitMenu()
{ {
if (!Settings::getInstance()->getBool("ShowQuitMenu")) { if (!Settings::getInstance()->getBool("ShowQuitMenu")) {

View file

@ -43,7 +43,6 @@ private:
void openConfigInput(GuiSettings* settings); void openConfigInput(GuiSettings* settings);
void openCollectionSystemOptions(); void openCollectionSystemOptions();
void openOtherOptions(); void openOtherOptions();
void openUtilitiesMenu();
void openQuitMenu(); void openQuitMenu();
MenuComponent mMenu; MenuComponent mMenu;