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 4fdb4991f4
commit c96c1f6211
2 changed files with 3 additions and 4 deletions

View File

@ -40,6 +40,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

@ -143,14 +143,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();