Merge pull request #13004 from Dentomologist/menubar_update_select_state_slot_on_hotkey

MenuBar: Update checkmarked Select State Slot when hotkeys are pressed
This commit is contained in:
Tilka 2024-08-14 02:27:36 +01:00 committed by GitHub
commit f712ea71f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -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);
});
}
}