Qt: Fix game display sometimes disappearing after closing load/save state screen

This commit is contained in:
Vicki Pfau 2020-11-17 19:25:46 -08:00
parent 1c2ec714e1
commit a37060d053
2 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,7 @@ Other fixes:
- Qt: Fix a race condition in the frame inspector
- Qt: Load/save bytes from memory viewer in the order visible (fixes mgba.io/i/1900)
- Qt: Fix running proxied video if it gets pushed to the main thread
- Qt: Fix game display sometimes disappearing after closing load/save state screen
- SM83: Simplify register pair access on big endian
- SM83: Disassemble STOP as one byte
Misc:

View File

@ -1071,6 +1071,7 @@ void Window::openStateWindow(LoadSave ls) {
connect(this, &Window::shutdown, m_stateWindow, &QWidget::close);
connect(m_stateWindow, &LoadSaveState::closed, [this]() {
detachWidget(m_stateWindow);
static_cast<QStackedLayout*>(m_screenWidget->layout())->setCurrentWidget(m_display.get());
m_stateWindow = nullptr;
QMetaObject::invokeMethod(this, "setFocus", Qt::QueuedConnection);
});