Merge pull request #13907 from TryTwo/PR_Cheat_Refresh

Cheats: Refresh active code after editing it.
This commit is contained in:
JMC47 2025-10-02 17:48:00 -04:00 committed by GitHub
commit 70f9ae2432
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View file

@ -236,6 +236,7 @@ void GeckoCodeWidget::EditCode()
return;
const int index = item->data(Qt::UserRole).toInt();
const bool enabled = item->checkState() == Qt::Checked;
m_cheat_code_editor->SetGeckoCode(&m_gecko_codes[index]);
if (m_cheat_code_editor->exec() == QDialog::Rejected)
@ -243,6 +244,9 @@ void GeckoCodeWidget::EditCode()
SaveCodes();
UpdateList();
if (!m_restart_required && enabled)
Gecko::SetActiveCodes(m_gecko_codes, m_game_id, m_game_revision);
}
void GeckoCodeWidget::RemoveCode()