From c00374419b87b37641375fbd556ce9fcc99b3a57 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 27 Sep 2020 11:41:53 +0200 Subject: [PATCH] Fixed an issue where the gamelist would sometimes not reload after media files updates. --- es-app/src/guis/GuiMetaDataEd.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/es-app/src/guis/GuiMetaDataEd.cpp b/es-app/src/guis/GuiMetaDataEd.cpp index 281eeba45..4e4993c18 100644 --- a/es-app/src/guis/GuiMetaDataEd.cpp +++ b/es-app/src/guis/GuiMetaDataEd.cpp @@ -455,12 +455,21 @@ void GuiMetaDataEd::close() std::function closeFunc; closeFunc = [this] { delete this; }; + std::function closeFuncReload; + closeFuncReload = [this] { + // Always reload the gamelist if media files were updated, even if the user + // selected to not save any metadata changes. + if (mMediaFilesUpdated) + ViewController::get()->reloadGameListView(mScraperParams.system); + delete this; + }; + if (metadataUpdated) { // Changes were made, ask if the user wants to save them. mWindow->pushGui(new GuiMsgBox(mWindow, getHelpStyle(), "SAVE CHANGES?", "YES", [this, closeFunc] { save(); closeFunc(); }, - "NO", closeFunc + "NO", closeFuncReload )); } else {