From 21dcda147c69455af70269ecd0cd3ab424e602cd Mon Sep 17 00:00:00 2001 From: Silent Date: Fri, 27 Jan 2023 18:31:30 +0100 Subject: [PATCH] Host: Fix a context menu regression from #7960 --- pcsx2-qt/MainWindow.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pcsx2-qt/MainWindow.cpp b/pcsx2-qt/MainWindow.cpp index 1cacb3dddf..1359e9ace9 100644 --- a/pcsx2-qt/MainWindow.cpp +++ b/pcsx2-qt/MainWindow.cpp @@ -1571,12 +1571,14 @@ void MainWindow::onChangeDiscMenuAboutToHide() void MainWindow::onLoadStateMenuAboutToShow() { + m_ui.menuLoadState->clear(); updateSaveStateMenusEnableState(!m_current_game_serial.isEmpty()); populateLoadStateMenu(m_ui.menuLoadState, m_current_disc_path, m_current_game_serial, m_current_game_crc); } void MainWindow::onSaveStateMenuAboutToShow() { + m_ui.menuSaveState->clear(); updateSaveStateMenusEnableState(!m_current_game_serial.isEmpty()); populateSaveStateMenu(m_ui.menuSaveState, m_current_game_serial, m_current_game_crc); } @@ -2712,8 +2714,6 @@ static QString formatTimestampForSaveStateMenu(time_t timestamp) void MainWindow::populateLoadStateMenu(QMenu* menu, const QString& filename, const QString& serial, quint32 crc) { - menu->clear(); - if (serial.isEmpty()) return; @@ -2788,8 +2788,6 @@ void MainWindow::populateLoadStateMenu(QMenu* menu, const QString& filename, con void MainWindow::populateSaveStateMenu(QMenu* menu, const QString& serial, quint32 crc) { - menu->clear(); - if (serial.isEmpty()) return;