Qt: Fix some cases where key mapping can break if focus is adjusted

This commit is contained in:
Jeffrey Pfau 2015-01-04 22:30:23 -08:00
parent d99a58a857
commit 388c94a569
2 changed files with 3 additions and 4 deletions

View File

@ -24,6 +24,7 @@ Bugfixes:
- Video: Fix FFmpeg crashing when the file extension is wrong
- GBA Audio: Fix GB audio channels being too quiet (fixes #159)
- Qt: Fix a race condition when a game crashes immediately
- Qt: Fix some cases where key mapping can break if focus is adjusted
Misc:
- Qt: Disable sync to video by default
- GBA: Exit cleanly on FATAL if the port supports it

View File

@ -151,14 +151,12 @@ void GBAKeyEditor::paintEvent(QPaintEvent* event) {
}
void GBAKeyEditor::setNext() {
findFocus();
if (m_currentKey == m_keyOrder.end()) {
return;
}
if (!(*m_currentKey)->hasFocus()) {
m_currentKey = m_keyOrder.end();
}
++m_currentKey;
if (m_currentKey != m_keyOrder.end()) {
(*m_currentKey)->setFocus();