Qt/HotkeyScheduler: Fix state loading

This commit is contained in:
spycrab
2018-05-17 20:27:14 +02:00
parent f51eba9e79
commit f25213139d
4 changed files with 27 additions and 6 deletions

View File

@ -364,6 +364,15 @@ void MainWindow::ConnectHotkeys()
connect(m_hotkey_scheduler, &HotkeyScheduler::ScreenShotHotkey, this, &MainWindow::ScreenShot);
connect(m_hotkey_scheduler, &HotkeyScheduler::FullScreenHotkey, this, &MainWindow::FullScreen);
connect(m_hotkey_scheduler, &HotkeyScheduler::StateLoadSlot, this, &MainWindow::StateLoadSlotAt);
connect(m_hotkey_scheduler, &HotkeyScheduler::StateSaveSlot, this, &MainWindow::StateSaveSlotAt);
connect(m_hotkey_scheduler, &HotkeyScheduler::StateLoadLastSaved, this,
&MainWindow::StateLoadLastSavedAt);
connect(m_hotkey_scheduler, &HotkeyScheduler::StateLoadUndo, this, &MainWindow::StateLoadUndo);
connect(m_hotkey_scheduler, &HotkeyScheduler::StateSaveUndo, this, &MainWindow::StateSaveUndo);
connect(m_hotkey_scheduler, &HotkeyScheduler::StateSaveOldest, this,
&MainWindow::StateSaveOldest);
connect(m_hotkey_scheduler, &HotkeyScheduler::StateLoadSlotHotkey, this,
&MainWindow::StateLoadSlot);
connect(m_hotkey_scheduler, &HotkeyScheduler::StateSaveSlotHotkey, this,
@ -898,6 +907,11 @@ void MainWindow::StateLoadSlotAt(int slot)
State::Load(slot);
}
void MainWindow::StateLoadLastSavedAt(int slot)
{
State::LoadLastSaved(slot);
}
void MainWindow::StateSaveSlotAt(int slot)
{
State::Save(slot, true);