From 134313e313edb27c7bc054a5a53d29744e0cf27c Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Mon, 12 Aug 2024 23:57:57 -0700 Subject: [PATCH] MenuBar: Update checkmarked Select State Slot when hotkey pressed Update the checkmarked slot in the Select State Slot menu when the Increase Selected State Slot or Decrease Selected State Slot hotkeys are pressed. The actual selected save slot was being changed correctly before this commit; this just fixes the menu checkmark. --- Source/Core/DolphinQt/MenuBar.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Core/DolphinQt/MenuBar.cpp b/Source/Core/DolphinQt/MenuBar.cpp index b7dac7c918..b6e722fa7f 100644 --- a/Source/Core/DolphinQt/MenuBar.cpp +++ b/Source/Core/DolphinQt/MenuBar.cpp @@ -408,6 +408,10 @@ void MenuBar::AddStateSlotMenu(QMenu* emu_menu) action->setChecked(true); connect(action, &QAction::triggered, this, [=, this]() { emit SetStateSlot(i); }); + connect(this, &MenuBar::SetStateSlot, [action, i](const int slot) { + if (slot == i) + action->setChecked(true); + }); } }