Added save + load hotkeys

This commit is contained in:
Hamish Milne 2020-04-06 22:47:52 +01:00
parent 7ff985cef9
commit e74b44042b
4 changed files with 14 additions and 3 deletions

View file

@ -524,6 +524,10 @@ void GMainWindow::InitializeHotkeys() {
OnCaptureScreenshot();
}
});
connect(hotkey_registry.GetHotkey(main_window, ui.action_Load_from_Newest_Slot->text(), this),
&QShortcut::activated, ui.action_Load_from_Newest_Slot, &QAction::trigger);
connect(hotkey_registry.GetHotkey(main_window, ui.action_Save_to_Oldest_Slot->text(), this),
&QShortcut::activated, ui.action_Save_to_Oldest_Slot, &QAction::trigger);
}
void GMainWindow::ShowUpdaterWidgets() {
@ -1636,7 +1640,7 @@ void GMainWindow::OnSaveState() {
assert(action);
Core::System::GetInstance().SendSignal(Core::System::Signal::Save, action->data().toUInt());
UpdateSaveStates();
newest_slot = action->data().toUInt();
}
void GMainWindow::OnLoadState() {