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.
This commit is contained in:
parent
5af0ae25e6
commit
134313e313
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue